Scoreboard ui stuff
This commit is contained in:
parent
f0d177feeb
commit
279dc7f2c3
12 changed files with 1558 additions and 77 deletions
71
index.tsx
71
index.tsx
|
|
@ -1,5 +1,6 @@
|
|||
import React from 'react';
|
||||
import ReactDOM from 'react-dom/client';
|
||||
import { BrowserRouter } from 'react-router-dom';
|
||||
import { AuthProvider } from 'react-oidc-context';
|
||||
import { Toaster } from 'react-hot-toast';
|
||||
import App from './App';
|
||||
|
|
@ -11,45 +12,47 @@ if (!rootElement) {
|
|||
}
|
||||
|
||||
const onSigninCallback = () => {
|
||||
window.history.replaceState({}, document.title, window.location.pathname);
|
||||
window.history.replaceState({}, document.title, '/');
|
||||
};
|
||||
|
||||
const root = ReactDOM.createRoot(rootElement);
|
||||
root.render(
|
||||
<React.StrictMode>
|
||||
<AuthProvider
|
||||
{...oidcConfig}
|
||||
onSigninCallback={onSigninCallback}
|
||||
onRemoveUser={() => {
|
||||
window.localStorage.clear();
|
||||
}}
|
||||
>
|
||||
<Toaster
|
||||
position="top-center"
|
||||
toastOptions={{
|
||||
duration: 4000,
|
||||
style: {
|
||||
background: '#333',
|
||||
color: '#fff',
|
||||
fontWeight: 'bold',
|
||||
borderRadius: '1rem',
|
||||
padding: '12px 20px',
|
||||
},
|
||||
success: {
|
||||
iconTheme: {
|
||||
primary: '#22c55e',
|
||||
secondary: '#fff',
|
||||
},
|
||||
},
|
||||
error: {
|
||||
iconTheme: {
|
||||
primary: '#ef4444',
|
||||
secondary: '#fff',
|
||||
},
|
||||
},
|
||||
<BrowserRouter>
|
||||
<AuthProvider
|
||||
{...oidcConfig}
|
||||
onSigninCallback={onSigninCallback}
|
||||
onRemoveUser={() => {
|
||||
localStorage.removeItem('kaboot_session');
|
||||
}}
|
||||
/>
|
||||
<App />
|
||||
</AuthProvider>
|
||||
>
|
||||
<Toaster
|
||||
position="top-center"
|
||||
toastOptions={{
|
||||
duration: 4000,
|
||||
style: {
|
||||
background: '#333',
|
||||
color: '#fff',
|
||||
fontWeight: 'bold',
|
||||
borderRadius: '1rem',
|
||||
padding: '12px 20px',
|
||||
},
|
||||
success: {
|
||||
iconTheme: {
|
||||
primary: '#22c55e',
|
||||
secondary: '#fff',
|
||||
},
|
||||
},
|
||||
error: {
|
||||
iconTheme: {
|
||||
primary: '#ef4444',
|
||||
secondary: '#fff',
|
||||
},
|
||||
},
|
||||
}}
|
||||
/>
|
||||
<App />
|
||||
</AuthProvider>
|
||||
</BrowserRouter>
|
||||
</React.StrictMode>
|
||||
);
|
||||
Loading…
Add table
Add a link
Reference in a new issue