Skip to content

Commit 91b6446

Browse files
committed
Resolve the bug
1 parent 6f97738 commit 91b6446

3 files changed

Lines changed: 22 additions & 48 deletions

File tree

client/package-lock.json

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/src/App.jsx

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,15 @@ import TermsOfService from './pages/TermsOfService';
1616
import PrivacyPolicy from './pages/PrivacyPolicy';
1717
import NotFound from "./pages/NotFound";
1818

19-
function AppShell() {
19+
function AppContent() {
2020
const location = useLocation();
21+
// Only show LocationBanner if not on the Home page
2122
const showLocationBanner = location.pathname !== '/';
2223

2324
return (
2425
<div className="flex flex-col min-h-screen">
2526
<Navbar />
26-
{showLocationBanner ? <LocationBanner /> : null}
27+
{showLocationBanner && <LocationBanner />}
2728
<main className="flex-grow bg-gray-50">
2829
<Routes>
2930
<Route path="/" element={<Home />} />
@@ -34,7 +35,11 @@ function AppShell() {
3435
<Route path="/worker/:id" element={<WorkerProfile />} />
3536
<Route path="/profile" element={<Profile />} />
3637
<Route path="/bookings" element={<Bookings />} />
37-
{/* TODO: Add more routes here */}
38+
<Route path="/worker-register" element={<WorkerRegister />} />
39+
<Route path="/help" element={<HelpCenter />} />
40+
<Route path="/terms" element={<TermsOfService />} />
41+
<Route path="/privacy" element={<PrivacyPolicy />} />
42+
<Route path="*" element={<NotFound />} />
3843
</Routes>
3944
</main>
4045
<Footer />
@@ -45,27 +50,7 @@ function AppShell() {
4550
function App() {
4651
return (
4752
<Router>
48-
<div className="flex flex-col min-h-screen">
49-
<Navbar />
50-
<LocationBanner />
51-
<main className="flex-grow bg-gray-50">
52-
<Routes>
53-
<Route path="/" element={<Home />} />
54-
<Route path="/login" element={<Login />} />
55-
<Route path="/register" element={<Register />} />
56-
<Route path="/dashboard" element={<Dashboard />} />
57-
<Route path="/services" element={<Services />} />
58-
<Route path="/worker/:id" element={<WorkerProfile />} />
59-
<Route path="/profile" element={<Profile />} />
60-
<Route path="/bookings" element={<Bookings />} />
61-
<Route path="/worker-register" element={<WorkerRegister />} />
62-
<Route path="*" element={<NotFound />} />
63-
{/* TODO: Add more routes here */}
64-
</Routes>
65-
</main>
66-
<Footer />
67-
</div>
68-
<AppShell />
53+
<AppContent />
6954
</Router>
7055
);
7156
}

client/src/components/Footer.jsx

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ const Footer = () => {
5050
<a href="#" className="hover:text-blue-400 transition">
5151
<FaGithub />
5252
</a>
53+
</div>
5354
<div className="mt-4 text-sm text-gray-400 space-y-1">
5455
<div className="font-semibold text-gray-200">Trust-first marketplace</div>
5556
<div>Vetted pros • Secure booking • Clear pricing</div>
@@ -66,12 +67,7 @@ const Footer = () => {
6667
<li><Link to="/services" className={linkClass("/services")}>Services</Link></li>
6768
<li><Link to="/bookings" className={linkClass("/bookings")}>Bookings</Link></li>
6869
<li><Link to="/about" className={linkClass("/about")}>About</Link></li>
69-
<h3 className="text-white font-semibold mb-4">Navigation</h3>
70-
<ul className="space-y-2 text-sm">
71-
<li><a href="/" className="hover:text-blue-400">Home</a></li>
72-
<li><a href="/#how-it-works" className="hover:text-blue-400">How it works</a></li>
73-
<li><a href="/services" className="hover:text-blue-400">Services</a></li>
74-
<li><a href="/register" className="hover:text-blue-400">Join as a Pro</a></li>
70+
<li><Link to="/register" className={linkClass("/register")}>Join as a Pro</Link></li>
7571
</ul>
7672
</div>
7773

@@ -110,20 +106,6 @@ const Footer = () => {
110106
Subscribe
111107
</button>
112108
</form>
113-
{/* Legal */}
114-
<div>
115-
<h3 className="text-white font-semibold mb-4">Legal</h3>
116-
<ul className="space-y-2 text-sm">
117-
<li><Link to="/privacy" className={linkClass("/privacy")}>Privacy Policy</Link></li>
118-
<li><Link to="/terms" className={linkClass("/terms")}>Terms of Service</Link></li>
119-
</ul>
120-
<div className="mt-5">
121-
<h3 className="text-white font-medium mb-3">Contact</h3>
122-
<div className="text-sm text-gray-400 space-y-2">
123-
<div><span className="text-gray-300 font-semibold">Email:</span> support@fixnearby.com</div>
124-
<div><span className="text-gray-300 font-semibold">Phone:</span> +1 (000) 000-0000</div>
125-
</div>
126-
</div>
127109
</div>
128110
</div>
129111

@@ -164,10 +146,6 @@ const Footer = () => {
164146
<FaEnvelope />
165147
Contact
166148
</Link>
167-
<div className="flex space-x-4 mt-3 md:mt-0">
168-
<a href="#" className="hover:text-blue-400">Help</a>
169-
<a href="#" className="hover:text-blue-400">Privacy</a>
170-
<a href="#" className="hover:text-blue-400">Terms</a>
171149
</div>
172150
</div>
173151
</footer>

0 commit comments

Comments
 (0)