Skip to content

Commit e177517

Browse files
committed
fix(name,Tab):changed the name and temoprily disbaled the tab
1 parent 29534b2 commit e177517

3 files changed

Lines changed: 12 additions & 13 deletions

File tree

app/page.tsx

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,21 @@ import { useEffect, useState } from 'react';
44
import Navbar from '@/components/Navbar';
55
import HostelGrid from '@/components/main/hostelGrid';
66
import FilterSection from '@/components/main/FilterSection';
7-
import TabSection from '@/components/main/TabSection';
7+
// import TabSection from '@/components/main/TabSection';
88
// import Footer from '@/components/Footer';
9-
// import LoadingScreen from "@/components/loadingScrenn";
10-
import Link from 'next/link';
9+
import LoadingScreen from "@/components/loadingScrenn";
1110

1211

1312
export default function Home() {
14-
const [activeTab, setActiveTab] = useState("All");
13+
const [activeTab,] = useState("All");
1514
const [filters, setFilters] = useState<Record<string, string[]>>({});
1615
const [refreshTrigger, setRefreshTrigger] = useState(false); // State to trigger hostel re-fetch
17-
// const [loading, setLoading] = useState(true); // Track loading state
16+
const [loading, setLoading] = useState(true); // Track loading state
1817

1918
useEffect(() => {
2019
// Simulate a loading delay
21-
// const timer = setTimeout(() => setLoading(false), 1500);
22-
// return () => clearTimeout(timer);
20+
const timer = setTimeout(() => setLoading(false), 1500);
21+
return () => clearTimeout(timer);
2322
setRefreshTrigger(prev => !prev); // Trigger re-fetch when component mounts
2423

2524
}, []);
@@ -31,17 +30,17 @@ export default function Home() {
3130
};
3231

3332
// Show the loading screen first
34-
// if (loading) {
35-
// return <LoadingScreen />;
36-
// }
33+
if (loading) {
34+
return <LoadingScreen />;
35+
}
3736

3837
return (
3938
<main className="min-h-screen bg-gray-50">
4039
<Navbar />
4140
<div className="flex flex-col md:flex-row p-4 md:p-0">
4241
<FilterSection onFilterSubmit={setFilters} onClearFilters={handleClearFilters} />
4342
<div className="flex-1 max-w-7xl px-4 py-6 space-y-8 w-full">
44-
<TabSection activeTab={activeTab} onTabChange={setActiveTab} />
43+
{/* <TabSection activeTab={activeTab} onTabChange={setActiveTab} /> */}
4544
<HostelGrid activeTab={activeTab} filters={filters} refreshTrigger={refreshTrigger} />
4645
</div>
4746
</div>

components/Navbar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const Navbar = () => {
3333
<div className="max-w-screen-xl flex items-center justify-between mx-auto py-5">
3434
{/* Logo Section */}
3535
<div className="flex flex-row font-poppins font-bold text-[26px] z-10 items-center relative text-black">
36-
Project Archive
36+
NearbyHostel
3737
</div>
3838

3939
{/* Authentication Button */}

components/loadingScrenn.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const LoadingScreen = () => {
1515

1616
return (
1717
<div className="fixed inset-0 flex items-center justify-center bg-gray-100">
18-
<h1 className="text-black text-7xl font-bold">Project Archive</h1>
18+
<h1 className="text-black text-7xl font-bold">Nearby Hostel</h1>
1919
</div>
2020
);
2121
};

0 commit comments

Comments
 (0)