File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -146,20 +146,15 @@ export const Route = createRootRouteWithContext<RouterContext>()({
146146} )
147147
148148function RootComponent ( ) {
149- // Suspension overlay: render the unavailable/archived message inline
150- // instead of redirecting to a /suspended URL. Same URL stays in the
151- // address bar so when the workspace state flips back to active the
152- // next render shows the actual page content. Exempt paths (login,
153- // oauth callbacks, magic-link landing) skip the overlay so suspended
154- // owners can still get back in.
155149 const ctx = Route . useRouteContext ( )
156150 const pathname = useRouterState ( { select : ( s ) => s . location . pathname } )
157- const showSuspended = ctx . state && ctx . state !== 'active' && ! isSuspensionExempt ( pathname )
151+ const overlayState =
152+ ctx . state && ctx . state !== 'active' && ! isSuspensionExempt ( pathname ) ? ctx . state : null
158153
159154 return (
160155 < RootDocument >
161156 < OttHandler />
162- { showSuspended ? < SuspendedView state = { ctx . state ! } /> : < Outlet /> }
157+ { overlayState ? < SuspendedView state = { overlayState } /> : < Outlet /> }
163158 </ RootDocument >
164159 )
165160}
You can’t perform that action at this time.
0 commit comments