From 3d40ff79126741759a0734e4901f90878be378be Mon Sep 17 00:00:00 2001 From: irl Date: Mon, 22 Jun 2026 15:32:01 +0100 Subject: [PATCH] fix: small fixes --- src/{home.tsx => Home.tsx} | 0 src/{profile.tsx => Profile.tsx} | 0 src/main.tsx | 34 ++++++++++++-------------------- vite.config.ts | 1 + 4 files changed, 14 insertions(+), 21 deletions(-) rename src/{home.tsx => Home.tsx} (100%) rename src/{profile.tsx => Profile.tsx} (100%) diff --git a/src/home.tsx b/src/Home.tsx similarity index 100% rename from src/home.tsx rename to src/Home.tsx diff --git a/src/profile.tsx b/src/Profile.tsx similarity index 100% rename from src/profile.tsx rename to src/Profile.tsx diff --git a/src/main.tsx b/src/main.tsx index 6434781..14c3d3d 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -1,35 +1,27 @@ -import { StrictMode } from 'react' -import { createRoot } from 'react-dom/client' +import {StrictMode} from 'react' +import {createRoot} from 'react-dom/client' import './index.css' import App from './App.tsx' import {AuthProvider, type AuthProviderProps} from "react-oidc-context"; import {type User, WebStorageStateStore} from "oidc-client-ts"; -import { BrowserRouter } from "react-router"; +import {BrowserRouter} from "react-router"; const onSigninCallback = (_user: User | void): void => { - window.history.replaceState( - {}, - document.title, - window.location.pathname - ) + window.history.replaceState({}, document.title, window.location.pathname) } const oidcConfig: AuthProviderProps = { authority: "https://sso.sr2.uk/realms/sr2", client_id: "chris-dev", - redirect_uri: "http://localhost:5173", + redirect_uri: window.location.href, onSigninCallback: onSigninCallback, - userStore: new WebStorageStateStore({ store: window.localStorage }), + userStore: new WebStorageStateStore({store: window.localStorage}), }; -createRoot(document.getElementById('root')!).render( - - - - - - - - - , -) +createRoot(document.getElementById('root')!).render( + + + + + +,) diff --git a/vite.config.ts b/vite.config.ts index 54df13c..7629a43 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -3,6 +3,7 @@ import react from '@vitejs/plugin-react' // https://vite.dev/config/ export default defineConfig({ + base: '/ui/', plugins: [react()], server: { proxy: {