add(frontend) pages shop & about
This commit is contained in:
@@ -2,6 +2,8 @@ import { BrowserRouter, Routes, Route, Navigate } from "react-router-dom";
|
||||
import Main from "./pages/Main";
|
||||
import AddItem from "./pages/AddItem";
|
||||
import AuthForm from "./components/AuthForm";
|
||||
import About from "./pages/About";
|
||||
import Shop from "./pages/Shop";
|
||||
|
||||
const PrivateRoute = ({ children }) => {
|
||||
const token = localStorage.getItem("token");
|
||||
@@ -33,6 +35,22 @@ export default function App() {
|
||||
</PrivateRoute>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="/about"
|
||||
element={
|
||||
<PrivateRoute>
|
||||
<About />
|
||||
</PrivateRoute>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="/shop"
|
||||
element={
|
||||
<PrivateRoute>
|
||||
<Shop />
|
||||
</PrivateRoute>
|
||||
}
|
||||
/>
|
||||
</Routes>
|
||||
</BrowserRouter>
|
||||
);
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
import PageLayout from "../components/PageLayout";
|
||||
|
||||
export default function Shop() {
|
||||
return (
|
||||
<PageLayout>
|
||||
<main className="px-16 grow w-full">
|
||||
<div className="flex flex-row text-white">
|
||||
<div className="text-4xl flex-col">
|
||||
<h1 className="uppercase">fish fish</h1>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</PageLayout>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
import PageLayout from "../components/PageLayout";
|
||||
|
||||
export default function Shop() {
|
||||
return (
|
||||
<PageLayout>
|
||||
<main className="px-16 grow w-full">
|
||||
<div className="flex flex-row text-white">
|
||||
<div className="text-4xl flex-col">
|
||||
<h1 className="uppercase">fish fish</h1>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</PageLayout>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user