mirror of
https://github.com/BrenBroZAYT/gameyfin.git
synced 2026-06-13 16:40:01 +00:00
22 lines
664 B
TypeScript
22 lines
664 B
TypeScript
import {protectRoutes} from '@hilla/react-auth';
|
|
import {createBrowserRouter, RouteObject} from 'react-router-dom';
|
|
import LoginView from "Frontend/views/LoginView";
|
|
import MainLayout from "Frontend/views/MainLayout";
|
|
import TestView from "Frontend/views/TestView";
|
|
|
|
export const routes = protectRoutes([
|
|
{
|
|
element: <MainLayout/>,
|
|
handle: {title: 'Main', requiresLogin: true},
|
|
children: [
|
|
{path: '/', element: <TestView/>, handle: {title: 'Gameyfin', requiresLogin: true}},
|
|
],
|
|
},
|
|
{
|
|
path: '/login',
|
|
element: <LoginView/>
|
|
}
|
|
]) as RouteObject[];
|
|
|
|
export default createBrowserRouter(routes);
|