Switch to Hilla for UI

This commit is contained in:
grimsi
2024-03-06 23:35:41 +01:00
parent 73457aad0b
commit e79dd7a6df
44 changed files with 12778 additions and 429 deletions
+21
View File
@@ -0,0 +1,21 @@
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);