mirror of
https://github.com/supabase/supabase.git
synced 2026-10-12 12:55:06 +03:00
* design polish * better banner * defensive truncation * better incident banner * better prop names * improve warnings * fix variant * OrganizationResourceBanner * notice banner * improve ClockSkewBanner * add ARIA label * rabbit * lil dot * 📝 Add docstrings to `dnywh/chore/improve-header-banner` (#41526) * 📝 Add docstrings to `dnywh/chore/improve-header-banner` Docstrings generation was requested by @dnywh. * https://github.com/supabase/supabase/pull/41525#issuecomment-3680124020 The following files were modified: * `apps/studio/hooks/misc/useOrganizationRestrictions.ts` * new line --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Danny White <3104761+dnywh@users.noreply.github.com> * fix clock docs link * Small nits * Fix URL for grace period warning to point to usage instead of billing * rabbit --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
61 lines
1.9 KiB
TypeScript
61 lines
1.9 KiB
TypeScript
import { type ReactNode } from 'react'
|
|
|
|
import { InlineLink } from 'components/ui/InlineLink'
|
|
|
|
export const RESTRICTION_MESSAGES = {
|
|
GRACE_PERIOD: {
|
|
title: 'Organization plan has exceeded its quota',
|
|
description: (date: string, slug: string): ReactNode => (
|
|
<>
|
|
You have been given a grace period until {date}.{' '}
|
|
<InlineLink href={`/org/${slug}/usage`}>Review usage</InlineLink>
|
|
</>
|
|
),
|
|
},
|
|
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
|
|
</>
|
|
),
|
|
},
|
|
MISSING_BILLING_INFO: {
|
|
title: 'Missing billing information',
|
|
description: (slug: string): ReactNode => (
|
|
<>
|
|
Please <InlineLink href={`/org/${slug}/billing#address`}>add a billing address</InlineLink>{' '}
|
|
to avoid restrictions. If you are a registered business, please add a tax ID too
|
|
</>
|
|
),
|
|
},
|
|
}
|