committed by
GitHub
9 changed files with 59 additions and 50 deletions
Before Width: | Height: | Size: 1.5 KiB |
@ -0,0 +1,21 @@ |
|||
import Admin from '../pages/Admin'; |
|||
import Dashboard from '../pages/Dashboard'; |
|||
import ErrorPage from '../pages/ErrorPage'; |
|||
import Items from '../pages/Items'; |
|||
import Layout from '../pages/Layout'; |
|||
import UserSettings from '../pages/UserSettings'; |
|||
|
|||
export default function privateRoutes() { |
|||
|
|||
return { |
|||
path: '/', |
|||
element: <Layout />, |
|||
errorElement: <ErrorPage />, |
|||
children: [ |
|||
{ path: '/', element: <Dashboard /> }, |
|||
{ path: 'items', element: <Items /> }, |
|||
{ path: 'admin', element: <Admin /> }, |
|||
{ path: 'settings', element: <UserSettings /> }, |
|||
], |
|||
}; |
|||
} |
@ -0,0 +1,13 @@ |
|||
import ErrorPage from '../pages/ErrorPage'; |
|||
import Login from '../pages/Login'; |
|||
import RecoverPassword from '../pages/RecoverPassword'; |
|||
|
|||
export default function publicRoutes() { |
|||
return [ |
|||
{ path: '/login', element: <Login />, errorElement: <ErrorPage /> }, |
|||
{ path: 'recover-password', element: <RecoverPassword />, errorElement: <ErrorPage /> }, |
|||
// TODO: complete this
|
|||
// { path: '*', element: <Navigate to='/login' replace /> }
|
|||
]; |
|||
} |
|||
|
Loading…
Reference in new issue