blob: 9703cfc65227b3527a9fb46b58ad1664ae1f2c31 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
import React from 'react';
import { BrowserRouter as Router, Routes, Route, useLocation } from 'react-router-dom';
import Navbar from './components/Navbar';
import Footer from './components/Footer';
import PopupWidget from './components/PopupWidget';
import Home from './components/Home';
import About from './pages/About';
import Contact from './pages/Contact';
import Login from "./pages/Login";
import ForgotPassword from "./pages/ForgotPassword";
import SignUp from "./pages/SignUp";
import Careers from "./pages/Careers";
import HelpCenter from "./pages/HelpCenter";
import TermsOfService from "./pages/TermsOfService";
import PrivacyPolicy from "./pages/PrivacyPolicy";
function App() {
const location = useLocation();
const excludedRoutes = ['/login', '/sign-up', '/forgot-password'];
return (
<div className="App">
{!excludedRoutes.includes(location.pathname) && <Navbar />}
<Routes>
<Route path="/" element={<Home />} />
<Route path="/about" element={<About />} />
<Route path="/contact-us" element={<Contact />} />
<Route path="/careers" element={<Careers />} />
<Route path="/help-center" element={<HelpCenter />} />
<Route path="/terms-of-service" element={<TermsOfService />} />
<Route path="/privacy-policy" element={<PrivacyPolicy />} />
<Route path="/login" element={<Login />} />
<Route path="/forgot-password" element={<ForgotPassword />} />
<Route path="/sign-up" element={<SignUp />} />
</Routes>
{!excludedRoutes.includes(location.pathname) && <Footer />}
{!excludedRoutes.includes(location.pathname) && <PopupWidget />}
</div>
);
}
function Root() {
return (
<Router>
<App />
</Router>
);
}
export default Root;
|