Files
supabase/apps/studio/components/interfaces/Organization/InvoicesSettings/InvoicesSection.tsx
Joshen Lim 85194a05d8 Joshenlim/fe 5190 move off scaffold components in (#53849)
## 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
2026-11-24 10:39:33 +07:00

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>
)
}