feat: add page cart
This commit is contained in:
@@ -6,6 +6,7 @@ import About from "./pages/About";
|
||||
import Shop from "./pages/Shop";
|
||||
import NotFoundPage from "./pages/NotFoundPage";
|
||||
import Contact from "./pages/Contact";
|
||||
import Cart from "./pages/Cart";
|
||||
|
||||
const PrivateRoute = ({ children }) => {
|
||||
const token = localStorage.getItem("token");
|
||||
@@ -26,6 +27,14 @@ export default function App() {
|
||||
<Route path="/about" element={<About />} />
|
||||
<Route path="/shop" element={<Shop />} />
|
||||
<Route path="/contact" element={<Contact />} />
|
||||
<Route
|
||||
path="/cart"
|
||||
element={
|
||||
<PrivateRoute>
|
||||
<Cart />
|
||||
</PrivateRoute>
|
||||
}
|
||||
/>
|
||||
|
||||
<Route path="*" element={<NotFoundPage />} />
|
||||
</Routes>
|
||||
|
||||
Reference in New Issue
Block a user