62 lines
1.9 KiB
TypeScript
62 lines
1.9 KiB
TypeScript
import { FlexBox } from '@lumina/island/atoms/flex-box';
|
||
import { PartBoundary } from '@lumina/market/app/error-boundaries';
|
||
import { AuthGuard } from '@lumina/market/app/guards/auth-guard';
|
||
import {
|
||
DesktopHeader,
|
||
DesktopPageTitle,
|
||
ROUTES,
|
||
} from '@lumina/market/app/navigation';
|
||
import {
|
||
PricingForm,
|
||
PricingFormSkeleton,
|
||
} from '@lumina/market/app/screens/(flow)/dashboard/pricing/organisms/pricing-form';
|
||
import type { Metadata } from 'next';
|
||
import { Suspense } from 'react';
|
||
|
||
import { i18n } from '../../../../i18n';
|
||
|
||
export const metadata: Metadata = {
|
||
title: i18n.t('pricing:meta-title'),
|
||
robots: { index: false },
|
||
};
|
||
|
||
/**
|
||
* C7, «ویرایش قیمتها» on desktop (C7 ۸.۱): the creator header with داشبورد on, «بازگشت» above
|
||
* the title (to طرحهای اشتراک when opened on its own, R14), and the form in the 560 column. The form is the creator's own, so it renders in the
|
||
* browser behind cards of the same size.
|
||
*/
|
||
export default function PricingPage() {
|
||
const skeleton = (
|
||
<PricingFormSkeleton layout="desktop" label={i18n.t('pricing:loading')} />
|
||
);
|
||
|
||
return (
|
||
<FlexBox direction="flex-col" className="min-h-dvh bg-bg-page">
|
||
<DesktopHeader />
|
||
<FlexBox
|
||
tag="main"
|
||
justifyContent="justify-center"
|
||
className="px-8 py-10"
|
||
>
|
||
<FlexBox direction="flex-col" gap="gap-4" className="w-full max-w-form">
|
||
<DesktopPageTitle
|
||
title={i18n.t('pricing:title')}
|
||
parentHref={ROUTES.dashboard.plans}
|
||
/>
|
||
<PartBoundary
|
||
name="pricing-form"
|
||
description={i18n.t('pricing:error')}
|
||
framed
|
||
>
|
||
<AuthGuard role="creator" fallback={skeleton}>
|
||
<Suspense fallback={skeleton}>
|
||
<PricingForm layout="desktop" />
|
||
</Suspense>
|
||
</AuthGuard>
|
||
</PartBoundary>
|
||
</FlexBox>
|
||
</FlexBox>
|
||
</FlexBox>
|
||
);
|
||
}
|