feat : add footer , header , base css, progressBar , main and page components
This commit is contained in:
8
src/routes/PrivateRoute.tsx
Normal file
8
src/routes/PrivateRoute.tsx
Normal file
@@ -0,0 +1,8 @@
|
||||
import { Navigate } from "react-router-dom";
|
||||
import { isAuthenticated } from "../utils/auth";
|
||||
|
||||
const PrivateRoute = () => {
|
||||
return !isAuthenticated() && <Navigate to="/" />;
|
||||
};
|
||||
|
||||
export default PrivateRoute;
|
||||
8
src/routes/routes.tsx
Normal file
8
src/routes/routes.tsx
Normal file
@@ -0,0 +1,8 @@
|
||||
const router = [
|
||||
{ id: 1, name: "فروشگاه", path: "/" },
|
||||
{ id: 2, name: "آموزش", path: "tutorial" },
|
||||
{ id: 3, name: "قوانین و مقررات", path: "rule" },
|
||||
{ id: 4, name: "درباره ما", path: "about" },
|
||||
];
|
||||
|
||||
export default router;
|
||||
Reference in New Issue
Block a user