diff --git a/index.html b/index.html index aa37967..bf65eb4 100644 --- a/index.html +++ b/index.html @@ -1,12 +1,12 @@ - + Flipt - +
diff --git a/src/App.tsx b/src/App.tsx index 33ff736..5c6b490 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -10,12 +10,19 @@ import Layout from './app/Layout'; import NotFoundLayout from './app/NotFoundLayout'; import NewSegment from './app/segments/NewSegment'; import Segment, { segmentLoader } from './app/segments/Segment'; +import SessionProvider from './components/SessionProvider'; const Flags = loadable(() => import('./app/flags/Flags')); const Segments = loadable(() => import('./app/segments/Segments')); const Console = loadable(() => import('./app/console/Console')); +const Login = loadable(() => import('./app/auth/Login')); const router = createHashRouter([ + { + path: '/login', + element: , + errorElement: + }, { path: '/', element: , @@ -76,7 +83,7 @@ const router = createHashRouter([ const apiURL = '/api/v1'; const fetcher = async (uri: String) => { - const res = await fetch(apiURL + uri, { credentials: 'include' }); + const res = await fetch(apiURL + uri); class StatusError extends Error { info: string; @@ -110,11 +117,12 @@ export default function App() { return ( - + + + ); } diff --git a/src/app/ErrorLayout.tsx b/src/app/ErrorLayout.tsx index 6e5f959..42796e2 100644 --- a/src/app/ErrorLayout.tsx +++ b/src/app/ErrorLayout.tsx @@ -1,6 +1,5 @@ import { Link, useNavigate, useRouteError } from 'react-router-dom'; import logoFlag from '~/assets/logo-flag.png'; -import Footer from '~/components/Footer'; export default function ErrorLayout() { const error = useRouteError() as Error; @@ -45,7 +44,6 @@ export default function ErrorLayout() { -