wealth/apps/bear/src/app/(flow)/dashboard/pricing/page.tsx

62 lines
1.9 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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