first commit

This commit is contained in:
gotolombok
2026-01-31 17:21:32 +08:00
commit f839fbd63a
109 changed files with 19204 additions and 0 deletions

28
app/movie/[id]/page.tsx Normal file
View File

@@ -0,0 +1,28 @@
import { getMovieDetail } from '@/lib/api';
import MovieDetailView from '@/components/MovieDetailView';
interface PageProps {
params: Promise<{ id: string }>;
}
export default async function MoviePage({ params }: PageProps) {
const { id } = await params;
if (!id || id === '[object Object]') {
return <div className="min-h-screen bg-[#141414] text-white flex items-center justify-center">Invalid Movie ID</div>;
}
try {
const detail = await getMovieDetail(id);
return <MovieDetailView detail={detail} />;
} catch (e) {
// Silently handle error for invalid IDs
return (
<div className="min-h-screen bg-[#141414] text-white flex flex-col items-center justify-center gap-4">
<h1 className="text-2xl font-bold">Movie Not Found</h1>
<p className="text-gray-400">The content you are looking for does not exist or has been removed.</p>
<a href="/" className="bg-red-600 px-6 py-2 rounded-full hover:bg-red-700 transition">Go Home</a>
</div>
);
}
}