mirror of
https://github.com/supabase/supabase.git
synced 2026-12-06 08:29:01 +00:00
## Context Housekeeping to deprecate more deprecated UI components, this one's focusing on the `Scaffold` components. The main visual differences are just the width within PageSections since the new components where the right content takes up a bit more width than the left content. (Ref org billing + usage) Starting the refactor with the organization pages: - Billing - Team - Usage - Settings -> SSO - Settings -> Security - Settings -> Audit Logs - Settings -> Documents
40 lines
1.3 KiB
TypeScript
40 lines
1.3 KiB
TypeScript
import {
|
|
PageSection,
|
|
PageSectionContent,
|
|
PageSectionDescription,
|
|
PageSectionMeta,
|
|
PageSectionSummary,
|
|
PageSectionTitle,
|
|
} from 'ui-patterns/PageSection'
|
|
|
|
import { InvoicesSettings } from './InvoicesSettings'
|
|
import { NoPermission } from '@/components/ui/NoPermission'
|
|
import { FGA_PERMISSIONS, useAsyncCheckPermissionsV2 } from '@/hooks/misc/useCheckPermissionsV2'
|
|
|
|
export const InvoicesSection = () => {
|
|
const { isSuccess: isPermissionsLoaded, can: canReadInvoices } = useAsyncCheckPermissionsV2(
|
|
FGA_PERMISSIONS.ORGANIZATION.BILLING_READ
|
|
)
|
|
|
|
return (
|
|
<PageSection orientation="horizontal">
|
|
<PageSectionMeta>
|
|
<PageSectionSummary>
|
|
<PageSectionTitle>Past Invoices</PageSectionTitle>
|
|
<PageSectionDescription>
|
|
You get an invoice every time you change your plan or when your monthly billing cycle
|
|
resets.
|
|
</PageSectionDescription>
|
|
</PageSectionSummary>
|
|
</PageSectionMeta>
|
|
<PageSectionContent className="flex flex-col gap-6">
|
|
{isPermissionsLoaded && !canReadInvoices ? (
|
|
<NoPermission resourceText="view this organization's upcoming invoice" />
|
|
) : (
|
|
<InvoicesSettings />
|
|
)}
|
|
</PageSectionContent>
|
|
</PageSection>
|
|
)
|
|
}
|