wealth/apps/bull/src/app/(main)/notifications/page.tsx

48 lines
1.6 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 { SkeletonPreset } from '@lumina/island/organisms/skeleton-preset';
import { PartBoundary } from '@lumina/market/app/error-boundaries';
import { AuthGuard } from '@lumina/market/app/guards/auth-guard';
import { MobileTopBar } from '@lumina/market/app/navigation';
import { NotificationCentre } from '@lumina/market/app/screens/(main)/notifications/organisms/notification-centre';
import type { Metadata } from 'next';
import { Suspense } from 'react';
import { i18n } from '../../../i18n';
export const metadata: Metadata = {
title: i18n.t('notifications:title'),
robots: { index: false },
};
/**
* اعلان‌ها on mobile (U5 ۲.۱): a page pushed from the bell, back · «اعلان‌ها» · support, with the
* nav kept. The member's own notifications, in the browser only, behind rows of the same size.
*/
export default function NotificationsPage() {
const skeleton = (
<SkeletonPreset
preset="list"
avatar={false}
label={i18n.t('notifications:loading')}
/>
);
return (
<>
<MobileTopBar title={i18n.t('notifications:title')} />
<FlexBox tag="main" direction="flex-col" className="flex-1 p-4">
<PartBoundary
name="notification-centre"
description={i18n.t('notifications:error')}
>
<AuthGuard fallback={skeleton}>
<Suspense fallback={skeleton}>
<NotificationCentre layout="page" supportPlacement="bottom" />
</Suspense>
</AuthGuard>
</PartBoundary>
</FlexBox>
</>
);
}