21 lines
573 B
TypeScript
21 lines
573 B
TypeScript
// app/dashboard/liked-videos/page.tsx
|
|
import { Metadata } from 'next';
|
|
import { getServerSession } from 'next-auth';
|
|
import { authOptions } from '@/lib/auth-options';
|
|
import { redirect } from 'next/navigation';
|
|
import LikedVideosClient from '../liked-videos-client';
|
|
|
|
export const metadata: Metadata = {
|
|
title: 'Liked Videos | CMS',
|
|
description: 'View your liked videos',
|
|
};
|
|
|
|
export default async function LikedVideosPage() {
|
|
const session = await getServerSession(authOptions);
|
|
if (!session?.user) {
|
|
redirect('/login');
|
|
}
|
|
|
|
return <LikedVideosClient />;
|
|
}
|