fix(portal:auth): fixed styling from @tria-plc/iamui-common just rendering

This commit is contained in:
Michael Abebe
2026-05-15 11:17:03 +03:00
parent 7340d00827
commit f08f6b5209
11 changed files with 1582 additions and 13 deletions

View File

@@ -31,6 +31,15 @@ const App = () => {
const navigate = useNavigate();
const location = useLocation();
if (location.pathname === "/auth") {
return (
<Routes>
<Route path="/auth" element={<IamLoginPage />} />
<Route path="*" element={<Navigate to="/auth" replace />} />
</Routes>
);
}
return (
<DashboardLayout
title="EDR Freight"
@@ -39,7 +48,6 @@ const App = () => {
onNavigate={navigate}
>
<Routes>
<Route path="/auth" element={<IamLoginPage />} />
<Route path="/" element={<DashboardPage />} />
<Route path="/bookings" element={<BookingsPage />} />
<Route path="/bookings/new" element={<CreateBookingPage />} />

View File

@@ -2,12 +2,14 @@ import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
import { BrowserRouter } from "react-router-dom";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import "@tria-plc/iamui-common/styles.css";
import App from "./App";
import {
AuthProvider,
BrandingProvider,
configureIam,
UserProvider,
} from "@tria-plc/iamui-common";
const queryClient = new QueryClient();
@@ -36,13 +38,15 @@ if (!rootElement) {
createRoot(document.getElementById("root")!).render(
<StrictMode>
<QueryClientProvider client={queryClient}>
<BrowserRouter>
<BrandingProvider>
<AuthProvider>
<BrowserRouter>
<App />
</BrowserRouter>
<UserProvider>
<App />
</UserProvider>
</AuthProvider>
</BrandingProvider>
</BrowserRouter>
</QueryClientProvider>
</StrictMode>,
);

View File

@@ -1,5 +1,19 @@
/// <reference types="vite/client" />
interface Window {
__IAM_CONFIG__?: {
apiUrl: string;
postLoginPath?: string;
};
__USER_MANAGEMENT_BRANDING__?: {
organizationName: string;
appName: string;
moduleBasePath: string;
backToAppPath?: string;
backToAppLabel?: string;
};
}
interface ImportMetaEnv {
readonly VITE_API_URL: string;
}