Files
supabase/apps/studio/routes/project/$ref/realtime/settings.tsx
Alaister YoungandAlaister Young 2695cf117a [FE-3106] (part 8) – refactor(studio): move storage, functions and branches pages (#53217)
Moves the `/storage`, `/realtime`, `/compute`, `/functions` and
`/branches` page bodies into their route files and deletes the pages
(FE-3106). Part 8 of the stack.

**Depends on:** #53216

**Changed:**
- `routes/project/$ref/{storage,realtime,compute,functions,branches}/**`
– 26 page bodies inlined. Wrappers the routes imported from pages
(`BranchesPageWrapper`, `MergeRequestsPageWrapper`, …) are now private
to their route files. Bucket redirects, function create/deploy
navigation and merge-request links use typed `navigate`/`Link`; function
logs/invocations use `useLocation().href`
- Edge function overview, logs-navigation, vectors, compute and branches
tests render the routes with `renderRoute`

- `routes/project/$ref/storage/files/buckets/$bucketId.tsx` – also
carries master's #52777 (Purge CDN cache action and single `action`
query param for the bucket modals), ported from the deleted page so it
isn't reverted

**Removed:**
- 26 page files

Addresses
[FE-3106](https://linear.app/supabase/issue/FE-3106/move-page-bodies-into-route-files-and-delete-pages).

## To test

- Storage: open a bucket, its policies link and S3 settings – same
layout; deleting a bucket returns to the list
- Edge Functions: create a function, open
Overview/Code/Logs/Invocations/Details – same layout
- Branches and merge requests – lists and "Review" links work

---------

Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
2026-11-17 16:13:36 +09:00

59 lines
1.8 KiB
TypeScript

import { createFileRoute } from '@tanstack/react-router'
import { Admonition } from 'ui-patterns/Admonition'
import { PageContainer } from 'ui-patterns/PageContainer'
import {
PageHeader,
PageHeaderAside,
PageHeaderDescription,
PageHeaderMeta,
PageHeaderSummary,
PageHeaderTitle,
} from 'ui-patterns/PageHeader'
import { PageSection, PageSectionContent } from 'ui-patterns/PageSection'
import { RealtimeSettings } from '@/components/interfaces/Realtime/RealtimeSettings'
import { DocsButton } from '@/components/ui/DocsButton'
import { DOCS_URL, IS_PLATFORM } from '@/lib/constants'
export const Route = createFileRoute('/project/$ref/realtime/settings')({
component: RealtimeSettingsPage,
staticData: {
realtimeLayoutTitle: 'Realtime Settings',
},
})
function RealtimeSettingsPage() {
return (
<>
<PageHeader>
<PageHeaderMeta>
<PageHeaderSummary>
<PageHeaderTitle>Realtime Settings</PageHeaderTitle>
<PageHeaderDescription>
Configure your project's Realtime settings
</PageHeaderDescription>
</PageHeaderSummary>
<PageHeaderAside>
<DocsButton href={`${DOCS_URL}/guides/realtime/settings`} />
</PageHeaderAside>
</PageHeaderMeta>
</PageHeader>
<PageContainer>
<PageSection>
<PageSectionContent>
{!IS_PLATFORM ? (
<Admonition
type="default"
title="Realtime settings are not available for self-hosted projects"
description="Realtime settings are only available for Supabase Platform projects."
/>
) : (
<RealtimeSettings />
)}
</PageSectionContent>
</PageSection>
</PageContainer>
</>
)
}