21 lines
586 B
TypeScript
21 lines
586 B
TypeScript
// app/dashboard/watch-history/page.tsx
|
|
import { Metadata } from 'next';
|
|
import { getServerSession } from 'next-auth';
|
|
import { authOptions } from '@/lib/auth-options';
|
|
import { redirect } from 'next/navigation';
|
|
import WatchHistoryClient from '../watch-history-client';
|
|
|
|
export const metadata: Metadata = {
|
|
title: 'Watch History | CMS',
|
|
description: 'View your video watch history',
|
|
};
|
|
|
|
export default async function WatchHistoryPage() {
|
|
const session = await getServerSession(authOptions);
|
|
if (!session?.user) {
|
|
redirect('/login');
|
|
}
|
|
|
|
return <WatchHistoryClient />;
|
|
}
|