mirror of
https://github.com/supabase/supabase.git
synced 2026-10-10 03:45:06 +03:00
routes/project/$ref/branches.tsx renders BranchLayout only — each leaf
keeps its own PageLayout because the title + primary/secondary actions
differ between Branches and Merge Requests, and the actions use hooks
(useAppStateSnapshot, useAsyncCheckPermissions) so they can't be moved
to staticData.
To avoid duplicating the wrapper logic in route files, the page-side
wrappers are hoisted/exported:
- pages/.../branches/index.tsx: \`BranchesPageWrapper\` was inline inside
getLayout; lifted to a top-level \`export const\` taking children, and
getLayout now uses it via \`<BranchesPageWrapper>{page}</BranchesPageWrapper>\`.
Both runtimes still see identical layout.
- pages/.../branches/merge-requests.tsx: \`MergeRequestsPageWrapper\` was
already top-level — just added \`export\`.
The route files import \`Page, { PageWrapper }\` from each page and render
\`<PageWrapper><Page/></PageWrapper>\`.
Migration doc updated with the BranchLayout-only delta.