Updates the packages and the banner live in the browser
The build still bakes the current packages and the active banner into the HTML. After hydration the page asks /api/v1/offerings and /api/v1/offerings/banner once and replaces what differs; errors and time-outs keep what was baked, and a 204 from the banner route hides the banner. The banner is now the OfferingBanner contract (title, text, optional link) instead of layout=banner. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -3,6 +3,7 @@ import type { ReactNode } from 'react';
|
||||
import { createRootRoute, HeadContent, Scripts } from '@tanstack/react-router';
|
||||
import { ChakraProvider } from '@chakra-ui/react';
|
||||
import AppShell from '../components/AppShell';
|
||||
import PackagesProvider from '../components/PackagesProvider/PackagesProvider';
|
||||
import NoScriptStyles from '../components/NoScript/NoScriptStyles';
|
||||
import ErrorPage from '../components/StatusPage/ErrorPage';
|
||||
import NotFound from '../components/StatusPage/NotFound';
|
||||
@@ -42,12 +43,12 @@ const RootDocument = ({ children }: { children: ReactNode }) => (
|
||||
);
|
||||
|
||||
const RootLayout = () => (
|
||||
<>
|
||||
<PackagesProvider>
|
||||
<AppShell />
|
||||
<Suspense>
|
||||
<RouterDevtools />
|
||||
</Suspense>
|
||||
</>
|
||||
</PackagesProvider>
|
||||
);
|
||||
|
||||
export const Route = createRootRoute({
|
||||
|
||||
Reference in New Issue
Block a user