mirror of
https://github.com/supabase/supabase.git
synced 2026-09-08 19:08:44 +08:00
## Context As per PR title - should not have any visual nor functional change <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Changes** - Standardized infrastructure, region, and database configuration around AWS-based environments. - Removed Fly.io-specific region and provider options from project creation, instance sizing, and infrastructure settings. - Enabled disk validation, spend-cap eligibility, backup restoration, and extension setup consistently across supported projects. - Updated billing and region displays to use the applicable AWS configuration. - **Bug Fixes** - Corrected project-specific restrictions that could incorrectly hide configuration and billing controls. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
55 lines
1.5 KiB
TypeScript
55 lines
1.5 KiB
TypeScript
import Link from 'next/link'
|
|
import { Badge, NavMenu, NavMenuItem } from 'ui'
|
|
|
|
import { useIsFeatureEnabled } from '@/hooks/misc/useIsFeatureEnabled'
|
|
import { useSelectedProjectQuery } from '@/hooks/misc/useSelectedProject'
|
|
|
|
type Props = {
|
|
active: 'pitr' | 'scheduled' | 'rtnp'
|
|
}
|
|
|
|
function DatabaseBackupsNav({ active }: Props) {
|
|
const { ref } = useSelectedProjectQuery()?.data || {}
|
|
const { databaseRestoreToNewProject } = useIsFeatureEnabled(['database:restore_to_new_project'])
|
|
|
|
const navMenuItems = [
|
|
{
|
|
enabled: true,
|
|
id: 'scheduled',
|
|
label: 'Scheduled backups',
|
|
href: `/project/${ref}/database/backups/scheduled`,
|
|
},
|
|
{
|
|
enabled: true,
|
|
id: 'pitr',
|
|
label: 'Point in time',
|
|
href: `/project/${ref}/database/backups/pitr`,
|
|
},
|
|
{
|
|
enabled: databaseRestoreToNewProject,
|
|
id: 'rtnp',
|
|
label: (
|
|
<div className="flex items-center gap-2">
|
|
Restore to new project <Badge variant="warning">Beta</Badge>
|
|
</div>
|
|
),
|
|
href: `/project/${ref}/database/backups/restore-to-new-project`,
|
|
},
|
|
] as const
|
|
|
|
return (
|
|
<NavMenu className="overflow-hidden overflow-x-auto">
|
|
{navMenuItems.map(
|
|
(item) =>
|
|
item.enabled && (
|
|
<NavMenuItem key={item.id} active={item.id === active}>
|
|
<Link href={item.href}>{item.label}</Link>
|
|
</NavMenuItem>
|
|
)
|
|
)}
|
|
</NavMenu>
|
|
)
|
|
}
|
|
|
|
export default DatabaseBackupsNav
|