fix: small fixes

This commit is contained in:
Iain Learmonth 2026-06-22 15:32:01 +01:00
parent f4b890b6b3
commit 3d40ff7912
4 changed files with 14 additions and 21 deletions

View file

@ -7,29 +7,21 @@ import {type User, WebStorageStateStore} from "oidc-client-ts";
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}),
};
createRoot(document.getElementById('root')!).render(
<StrictMode>
createRoot(document.getElementById('root')!).render(<StrictMode>
<AuthProvider {...oidcConfig}>
<BrowserRouter>
<BrowserRouter basename="/ui">
<App/>
</BrowserRouter>
</AuthProvider>
</StrictMode>,
)
</StrictMode>,)

View file

@ -3,6 +3,7 @@ import react from '@vitejs/plugin-react'
// https://vite.dev/config/
export default defineConfig({
base: '/ui/',
plugins: [react()],
server: {
proxy: {