feat: add keycloak account creation and club groupe set
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import {useEffect, useRef} from 'react'
|
||||
import './App.css'
|
||||
import {Nav} from "./components/Nav.jsx";
|
||||
import {createBrowserRouter, Outlet, RouterProvider, useRouteError} from "react-router-dom";
|
||||
import {Home} from "./pages/Homepage.jsx";
|
||||
@@ -7,6 +6,10 @@ import {AdminRoot, getAdminChildren} from "./pages/admin/AdminRoot.jsx";
|
||||
import {AuthCallback} from "./components/auhCallback.jsx";
|
||||
import {KeycloakContextProvider, useAuthDispatch} from "./hooks/useAuth.jsx";
|
||||
import {check_validity} from "./utils/auth.js";
|
||||
import {ToastContainer} from "react-toastify";
|
||||
|
||||
import './App.css'
|
||||
import 'react-toastify/dist/ReactToastify.css';
|
||||
|
||||
const router = createBrowserRouter([
|
||||
{
|
||||
@@ -49,7 +52,7 @@ function Root() {
|
||||
if (isInit.current)
|
||||
return;
|
||||
isInit.current = true
|
||||
check_validity(b => dispatch({type: 'init', val: b}))
|
||||
check_validity(data => dispatch({type: 'init', val: data}))
|
||||
}, []);
|
||||
|
||||
return <>
|
||||
@@ -58,6 +61,19 @@ function Root() {
|
||||
</header>
|
||||
<div className="container my-4">
|
||||
<Outlet/>
|
||||
<ToastContainer
|
||||
position="top-right"
|
||||
autoClose={5000}
|
||||
hideProgressBar={false}
|
||||
newestOnTop={false}
|
||||
closeOnClick
|
||||
rtl={false}
|
||||
pauseOnFocusLoss
|
||||
draggable
|
||||
pauseOnHover
|
||||
theme="light"
|
||||
transition: Flip
|
||||
/>
|
||||
</div>
|
||||
</>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user