mirror of
https://github.com/supabase/supabase.git
synced 2026-10-09 19:35:06 +03:00
## Problem We now export components under a subpath in ui-patterns to avoid barrel files as they slow down every tools (from IDE to linters, etc.) and may also affect bundles our users have to download. ## Solution - Remove the UI patterns index file - Fix invalid impors
61 lines
2.1 KiB
TypeScript
61 lines
2.1 KiB
TypeScript
import dayjs from 'dayjs'
|
|
import { type ReactNode } from 'react'
|
|
import { TimestampInfo } from 'ui-patterns/TimestampInfo'
|
|
|
|
import { InlineLink } from '@/components/ui/InlineLink'
|
|
|
|
export const RESTRICTION_MESSAGES = {
|
|
GRACE_PERIOD: {
|
|
title: 'Organization exceeded its quota in the previous billing cycle',
|
|
description: (date: string, slug: string): ReactNode => {
|
|
const label = dayjs(date).format('DD MMM, YYYY')
|
|
return (
|
|
<>
|
|
You have a grace period until{' '}
|
|
<TimestampInfo className="text-sm" utcTimestamp={date} label={label} />. After that, your
|
|
projects will be restricted while your organization is over quota.{' '}
|
|
<InlineLink href={`/org/${slug}/usage`}>Review usage</InlineLink> or{' '}
|
|
<InlineLink href={`/org/${slug}/billing`}>manage your plan</InlineLink> to avoid
|
|
restrictions.
|
|
</>
|
|
)
|
|
},
|
|
},
|
|
GRACE_PERIOD_OVER: {
|
|
title: 'Grace period is over',
|
|
description: (slug: string): ReactNode => (
|
|
<>
|
|
Your projects will not be able to serve requests when you use up your quota.{' '}
|
|
<InlineLink href={`/org/${slug}/billing`}>Review billing</InlineLink>
|
|
</>
|
|
),
|
|
},
|
|
RESTRICTED: {
|
|
title: 'Services restricted',
|
|
description: (slug: string): ReactNode => (
|
|
<>
|
|
Your projects are unable to serve requests as your organization has used up its quota.{' '}
|
|
<InlineLink href={`/org/${slug}/billing`}>Resolve billing issues</InlineLink>
|
|
</>
|
|
),
|
|
},
|
|
OVERDUE_INVOICES: {
|
|
title: 'Outstanding invoices',
|
|
description: (slug: string): ReactNode => (
|
|
<>
|
|
Please <InlineLink href={`/org/${slug}/billing#invoices`}>pay your invoices</InlineLink> to
|
|
avoid service disruption
|
|
</>
|
|
),
|
|
},
|
|
OVERDUE_INVOICES_FROM_OTHER_ORGS: {
|
|
title: 'Outstanding invoices in other organization',
|
|
description: (slug: string): ReactNode => (
|
|
<>
|
|
Please <InlineLink href={`/org/${slug}/billing#invoices`}>pay invoices</InlineLink> for
|
|
other organizations to avoid service disruption
|
|
</>
|
|
),
|
|
},
|
|
}
|