Promote uat → main (PROD): GRO-2359 OOBE portal-creation routing (web) (#79)
Co-authored-by: Flea Flicker <22+gb_flea@noreply.git.farh.net> Co-committed-by: Flea Flicker <22+gb_flea@noreply.git.farh.net>
This commit was merged in pull request #79.
This commit is contained in:
+13
-1
@@ -16,6 +16,7 @@ import { BookingCancelledPage } from "./pages/BookingCancelled.js";
|
||||
import { BookingErrorPage } from "./pages/BookingError.js";
|
||||
import { SetupWizard } from "./pages/SetupWizard.tsx";
|
||||
import { CustomerPortal } from "./portal/CustomerPortal.js";
|
||||
import { OOBE } from "./portal/OOBE.js";
|
||||
import { DevLoginSelector, getDevUser } from "./pages/DevLoginSelector.js";
|
||||
import { DevSessionIndicator } from "./components/DevSessionIndicator.js";
|
||||
import { BrandingProvider, useBranding } from "./BrandingContext.js";
|
||||
@@ -406,7 +407,13 @@ export function App() {
|
||||
}
|
||||
|
||||
// Don't render portal chrome at /login — DevLoginSelector is shown instead
|
||||
const showCustomerPortal = !location.pathname.startsWith("/admin") && location.pathname !== "/login";
|
||||
const showCustomerPortal = !location.pathname.startsWith("/admin") && location.pathname !== "/login" && location.pathname !== "/onboarding";
|
||||
// GRO-2359: OOBE is mountable from a direct link (deep-link to /onboarding)
|
||||
// and from the post-auth callback (CustomerPortal navigates here when the
|
||||
// SSO bridge returns 404). Render the OOBE component standalone so it's
|
||||
// outside the portal chrome (no `!sessionId` guards, no `!initComplete`
|
||||
// loading states to fight — the OOBE handles its own auth resolution).
|
||||
const showOOBE = location.pathname === "/onboarding";
|
||||
|
||||
// At /login with a valid session, redirect to the portal root. Without this,
|
||||
// the final render returns null at /login (showCustomerPortal is false) and
|
||||
@@ -425,6 +432,11 @@ export function App() {
|
||||
</Routes>
|
||||
{authDisabled && <DevSessionIndicator />}
|
||||
</>
|
||||
) : showOOBE ? (
|
||||
<>
|
||||
<OOBE />
|
||||
{authDisabled && <DevSessionIndicator />}
|
||||
</>
|
||||
) : showCustomerPortal ? (
|
||||
<>
|
||||
<CustomerPortal />
|
||||
|
||||
Reference in New Issue
Block a user