-
Notifications
You must be signed in to change notification settings - Fork 130
/
App.js
69 lines (66 loc) · 2.23 KB
/
App.js
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
import {
createBrowserRouter,
RouterProvider,
Outlet,
createRoutesFromElements,
Route,
ScrollRestoration,
} from "react-router-dom";
import Footer from "./components/home/Footer/Footer";
import FooterBottom from "./components/home/Footer/FooterBottom";
import Header from "./components/home/Header/Header";
import HeaderBottom from "./components/home/Header/HeaderBottom";
import SpecialCase from "./components/SpecialCase/SpecialCase";
import About from "./pages/About/About";
import SignIn from "./pages/Account/SignIn";
import SignUp from "./pages/Account/SignUp";
import Cart from "./pages/Cart/Cart";
import Contact from "./pages/Contact/Contact";
import Home from "./pages/Home/Home";
import Journal from "./pages/Journal/Journal";
import Offer from "./pages/Offer/Offer";
import Payment from "./pages/payment/Payment";
import ProductDetails from "./pages/ProductDetails/ProductDetails";
import Shop from "./pages/Shop/Shop";
const Layout = () => {
return (
<div>
<Header />
<HeaderBottom />
<SpecialCase />
<ScrollRestoration />
<Outlet />
<Footer />
<FooterBottom />
</div>
);
};
const router = createBrowserRouter(
createRoutesFromElements(
<Route>
<Route path="/" element={<Layout />}>
{/* ==================== Header Navlink Start here =================== */}
<Route index element={<Home />}></Route>
<Route path="/shop" element={<Shop />}></Route>
<Route path="/about" element={<About />}></Route>
<Route path="/contact" element={<Contact />}></Route>
<Route path="/journal" element={<Journal />}></Route>
{/* ==================== Header Navlink End here ===================== */}
<Route path="/offer" element={<Offer />}></Route>
<Route path="/product/:_id" element={<ProductDetails />}></Route>
<Route path="/cart" element={<Cart />}></Route>
<Route path="/paymentgateway" element={<Payment />}></Route>
</Route>
<Route path="/signup" element={<SignUp />}></Route>
<Route path="/signin" element={<SignIn />}></Route>
</Route>
)
);
function App() {
return (
<div className="font-bodyFont">
<RouterProvider router={router} />
</div>
);
}
export default App;