47 lines
1.5 KiB
TypeScript
47 lines
1.5 KiB
TypeScript
|
|
import { PartBoundary } from '@lumina/market/app/error-boundaries';
|
|||
|
|
import { ROUTES } from '@lumina/market/app/navigation';
|
|||
|
|
import {
|
|||
|
|
EXAMPLE_CHANNEL_USERNAME,
|
|||
|
|
HomeFeed,
|
|||
|
|
HomeFeedSkeleton,
|
|||
|
|
HomeGuard,
|
|||
|
|
} from '@lumina/market/app/screens/(main)/organisms/home-feed';
|
|||
|
|
import type { Metadata } from 'next';
|
|||
|
|
import { Suspense } from 'react';
|
|||
|
|
|
|||
|
|
import { displayUrl } from '../../../configs';
|
|||
|
|
import { i18n } from '../../../i18n';
|
|||
|
|
import { HomeTemplate } from './templates/home-template';
|
|||
|
|
|
|||
|
|
export function generateMetadata(): Metadata {
|
|||
|
|
return { title: i18n.t('home:meta.title'), robots: { index: false } };
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* خانه, `/`: the investor's feed of the creators they follow. The server sends only the frame and
|
|||
|
|
* the feed's skeleton, the same for every visitor; the feed loads in the browser with the session.
|
|||
|
|
* A guest goes to login, which returns here, and a creator to their own channel. A failed feed
|
|||
|
|
* shows in a card in the column, as the desktop boards draw a state there (S3, S2-Desktop).
|
|||
|
|
*/
|
|||
|
|
export default function HomePage() {
|
|||
|
|
const skeleton = (
|
|||
|
|
<HomeFeedSkeleton layout="desktop" label={i18n.t('home:feed.loading')} />
|
|||
|
|
);
|
|||
|
|
return (
|
|||
|
|
<HomeTemplate>
|
|||
|
|
<PartBoundary name="home-feed" framed>
|
|||
|
|
<HomeGuard fallback={skeleton}>
|
|||
|
|
<Suspense fallback={skeleton}>
|
|||
|
|
<HomeFeed
|
|||
|
|
layout="desktop"
|
|||
|
|
exampleChannelUrl={displayUrl(
|
|||
|
|
ROUTES.channel(EXAMPLE_CHANNEL_USERNAME),
|
|||
|
|
)}
|
|||
|
|
/>
|
|||
|
|
</Suspense>
|
|||
|
|
</HomeGuard>
|
|||
|
|
</PartBoundary>
|
|||
|
|
</HomeTemplate>
|
|||
|
|
);
|
|||
|
|
}
|