mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 18:42:49 +00:00
fix(portal:auth): fixed styling from @tria-plc/iamui-common just rendering
This commit is contained in:
@@ -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 />} />
|
||||
|
||||
@@ -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>,
|
||||
);
|
||||
|
||||
14
apps/edr-freight-web/portal/src/vite-env.d.ts
vendored
14
apps/edr-freight-web/portal/src/vite-env.d.ts
vendored
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user