fp/packages/next/app/vt/[slug]/stream/[safeDate]/page.tsx

32 lines
888 B
TypeScript
Raw Normal View History

2024-01-20 16:16:14 +00:00
2024-07-10 22:11:18 +00:00
import { Stream } from '@/app/components/stream';
import { getStreamForVtuber } from '@/app/lib/streams';
import { getVtuberBySlug } from '@/app/lib/vtubers';
2024-01-20 16:16:14 +00:00
import NotFound from '../../not-found';
interface IPageProps {
params: {
safeDate: string;
slug: string;
};
}
export default async function Page({ params: { safeDate, slug } }: IPageProps) {
const vtuber = await getVtuberBySlug(slug);
if (!vtuber) return <NotFound></NotFound>
const stream = await getStreamForVtuber(vtuber.id, safeDate);
if (!stream) return <NotFound></NotFound>
return (
<div className="content">
<div className="section">
<h1 className="title">Stream Page!</h1>
<p className="subtitle">slug={slug} safeDate={safeDate}</p>
<Stream stream={stream} />
</div>
</div>
)
}