* refactor(ui): consolidate dashboard to one shell in the (dashboard) layout Moves the legacy ?page= switch page into the (dashboard) route group and hoists Navbar, sidebar, ThemeProvider, and DebugWarningBanner into the shared layout with real props, deleting the degraded duplicate shell that wrapped migrated routes. The active page key now derives from the URL at render time, so navigating between legacy and migrated pages no longer remounts the shell. useProxySettings becomes a React Query hook taking accessToken, shared by the navbar, the AdminPanel arm, and migrated pages; this replaces the lifted proxySettings state and the Navbar setProxySettings prop drilling. The invitation onboarding flow (?invitation_id=) keeps rendering without chrome via a layout escape hatch. Dead dark mode state and the no-op antd ConfigProvider are removed. * fix(ui): include accessToken in useProxySettings query key The queryFn closes over accessToken, so the key must include it for the cache to be honest about its inputs. Settings are instance-global today, which made the omission harmless, but a token change while mounted would have served the cached entry without refetching. * test(ui): point CreateKeyPage test at the moved page The page moved into the (dashboard) route group and no longer renders the navbar (the layout owns chrome now), so the valid-token test asserts the default page content (UserDashboard stub) instead.
15 lines
481 B
TypeScript
15 lines
481 B
TypeScript
"use client";
|
|
|
|
import APIReferenceView from "@/app/(dashboard)/api-reference/APIReferenceView";
|
|
import useAuthorized from "@/app/(dashboard)/hooks/useAuthorized";
|
|
import useProxySettings from "@/app/(dashboard)/hooks/proxySettings/useProxySettings";
|
|
|
|
const APIReferencePage = () => {
|
|
const { accessToken } = useAuthorized();
|
|
const proxySettings = useProxySettings(accessToken);
|
|
|
|
return <APIReferenceView proxySettings={proxySettings} />;
|
|
};
|
|
|
|
export default APIReferencePage;
|