The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
remove restriction banner component (#34887)
Joshen Lim5e9c2a3c71cd
diff --git a/apps/studio/components/interfaces/App/AppBannerWrapper.tsx b/apps/studio/components/interfaces/App/AppBannerWrapper.tsxindex 302ec30aa97..40252ee3e7d 100644--- a/apps/studio/components/interfaces/App/AppBannerWrapper.tsx+++ b/apps/studio/components/interfaces/App/AppBannerWrapper.tsx@@ -3,7 +3,6 @@ import { PropsWithChildren } from 'react'import { ClockSkewBanner } from 'components/layouts/AppLayout/ClockSkewBanner'import IncidentBanner from 'components/layouts/AppLayout/IncidentBanner'import { NoticeBanner } from 'components/layouts/AppLayout/NoticeBanner'-import { RestrictionBanner } from 'components/layouts/AppLayout/RestrictionBanner'import { useFlag } from 'hooks/ui/useFlag'import { useProfile } from 'lib/profile'import { OrganizationResourceBanner } from '../Organization/HeaderBanner'@@ -20,7 +19,6 @@ const AppBannerWrapper = ({ children }: PropsWithChildren<{}>) => {<div className="flex-shrink-0">{ongoingIncident && <IncidentBanner />}{showNoticeBanner && <NoticeBanner />}- {profile !== undefined && <RestrictionBanner />}<OrganizationResourceBanner />{clockSkewBanner && <ClockSkewBanner />}</div>diff --git a/apps/studio/components/layouts/AppLayout/RestrictionBanner.tsx b/apps/studio/components/layouts/AppLayout/RestrictionBanner.tsxdeleted file mode 100644index 4a0a7368802..00000000000--- a/apps/studio/components/layouts/AppLayout/RestrictionBanner.tsx+++ /dev/null@@ -1,42 +0,0 @@-import dayjs from 'dayjs'-import Link from 'next/link'--import { useOrganizationsQuery } from 'data/organizations/organizations-query'-import { useSelectedProject } from 'hooks/misc/useSelectedProject'-import { AlertTitle_Shadcn_, Alert_Shadcn_, Button, CriticalIcon, WarningIcon, cn } from 'ui'--/**- * Shown on projects in organization which are above their qouta- */-export const RestrictionBanner = () => {- const project = useSelectedProject()- const { data } = useOrganizationsQuery()- const currentOrg = data?.find((org) => org.id === project?.organization_id)-- if (!currentOrg?.restriction_status) return null-- return (- <Alert_Shadcn_- variant={currentOrg.restriction_status === 'restricted' ? 'destructive' : 'warning'}- className={cn(- 'rounded-none border-0 h-[44px] p-0 flex items-center justify-center',- currentOrg.restriction_status === 'restricted' ? 'bg-destructive-400' : 'bg-warning-500'- )}- >- <AlertTitle_Shadcn_ className="flex items-center gap-x-4">- {currentOrg.restriction_status === 'restricted' ? <CriticalIcon /> : <WarningIcon />}- <span>- {currentOrg.restriction_status === 'grace_period' &&- `Your organization has exceeded its quota. You are given a grace period until ${dayjs(currentOrg.restriction_data!['grace_period_end']).format('DD MMM, YYYY')}`}- {currentOrg.restriction_status === 'grace_period_over' &&- `Your grace period is over and your project will not be able to serve requests when you used up your quota.`}- {currentOrg.restriction_status === 'restricted' &&- 'Your project is unable to serve any requests as your organization has used up its quota.'}- </span>- <Button asChild type="default">- <Link href={`/org/${currentOrg.slug}/billing`}>More information</Link>- </Button>- </AlertTitle_Shadcn_>- </Alert_Shadcn_>- )-}