mirror of
https://github.com/supabase/supabase.git
synced 2026-10-12 21:05:06 +03:00
* Replace all usage of useProjectContext with useSelectedProjectQuery * Replace all usage of useSelectedProject with useSelectedProjectQuery * Replace all usage of useProjectByRef with useProjectByRefQuery * Replace all usage of useSelectedOrganization with useSelectedOrganizationQuery * Deprecate useSelectedProject, useSelectedOrganization, and useProjectByRef hooks * Deprecate ProjecContext
35 lines
1.3 KiB
TypeScript
35 lines
1.3 KiB
TypeScript
import { AlertCircleIcon } from 'lucide-react'
|
|
import Link from 'next/link'
|
|
|
|
import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization'
|
|
import { useAppStateSnapshot } from 'state/app-state'
|
|
import { AlertDescription_Shadcn_, AlertTitle_Shadcn_, Alert_Shadcn_, Button } from 'ui'
|
|
|
|
export const BranchingPlanNotice = () => {
|
|
const snap = useAppStateSnapshot()
|
|
const { data: selectedOrg } = useSelectedOrganizationQuery()
|
|
|
|
return (
|
|
<Alert_Shadcn_ className="rounded-none px-7 py-6 [&>svg]:top-6 [&>svg]:left-6 border-0 border-t">
|
|
<AlertCircleIcon />
|
|
<AlertTitle_Shadcn_>
|
|
Database branching is only available on the Pro Plan and above
|
|
</AlertTitle_Shadcn_>
|
|
<AlertDescription_Shadcn_>
|
|
Go to your organization's billing settings and upgrade your plan to enable branching for
|
|
this project
|
|
</AlertDescription_Shadcn_>
|
|
<AlertDescription_Shadcn_>
|
|
<Button size="tiny" type="default" className="mt-4">
|
|
<Link
|
|
href={`/org/${selectedOrg?.slug}/billing?panel=subscriptionPlan&source=enableBranchingButton`}
|
|
onClick={() => snap.setShowCreateBranchModal(false)}
|
|
>
|
|
Upgrade to Pro
|
|
</Link>
|
|
</Button>
|
|
</AlertDescription_Shadcn_>
|
|
</Alert_Shadcn_>
|
|
)
|
|
}
|