feat:add admin order page
This commit is contained in:
@@ -10,6 +10,7 @@ import Cart from "./pages/Cart";
|
||||
import Profile from "./pages/Profile";
|
||||
import ItemPage from "./pages/ItemPage";
|
||||
import AdminPage from "./pages/AdminPage";
|
||||
import AdminOrderDetail from "./pages/AdminOrderPage";
|
||||
|
||||
const PrivateRoute = ({ children }) => {
|
||||
const token = localStorage.getItem("token");
|
||||
@@ -62,6 +63,14 @@ export default function App() {
|
||||
</AdminRoute>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="/admin/orders/:id"
|
||||
element={
|
||||
<AdminRoute>
|
||||
<AdminOrderDetail />
|
||||
</AdminRoute>
|
||||
}
|
||||
/>
|
||||
<Route path="items/:id" element={<ItemPage />} />
|
||||
<Route path="*" element={<NotFoundPage />} />
|
||||
</Routes>
|
||||
|
||||
Reference in New Issue
Block a user