51 lines
1.7 KiB
TypeScript
51 lines
1.7 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 { MobileTopBar, ROUTES } from '@lumina/market/app/navigation';
|
|
import {
|
|
SubscriberList,
|
|
SubscriberListSkeleton,
|
|
} from '@lumina/market/app/screens/(main)/dashboard/subscribers/organisms/subscriber-list';
|
|
import type { Metadata } from 'next';
|
|
import { Suspense } from 'react';
|
|
|
|
import { i18n } from '../../../../i18n';
|
|
|
|
export const metadata: Metadata = {
|
|
title: i18n.t('dashboard:subscribers.meta-title'),
|
|
robots: { index: false },
|
|
};
|
|
|
|
/**
|
|
* «مشترکان» on mobile (J10-1f, J10-1g): a page pushed from نمای کلی or طرحهای اشتراک, back ·
|
|
* «مشترکان» · support, with the nav kept on داشبورد. The creator's own, in the browser only;
|
|
* opened on its own, back goes to نمای کلی.
|
|
*/
|
|
export default function SubscribersPage() {
|
|
const skeleton = (
|
|
<SubscriberListSkeleton label={i18n.t('dashboard:subscribers.loading')} />
|
|
);
|
|
|
|
return (
|
|
<>
|
|
<MobileTopBar
|
|
title={i18n.t('dashboard:subscribers.title')}
|
|
parentHref={ROUTES.dashboard.overview}
|
|
backToPrevious
|
|
/>
|
|
<FlexBox tag="main" direction="flex-col" className="flex-1 p-4">
|
|
<PartBoundary
|
|
name="subscriber-list"
|
|
description={i18n.t('dashboard:subscribers.error')}
|
|
>
|
|
<AuthGuard role="creator" fallback={skeleton}>
|
|
<Suspense fallback={skeleton}>
|
|
<SubscriberList />
|
|
</Suspense>
|
|
</AuthGuard>
|
|
</PartBoundary>
|
|
</FlexBox>
|
|
</>
|
|
);
|
|
}
|