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: {