diff --git a/app/(main)/playlist/[id]/page.tsx b/app/(main)/playlist/[id]/page.tsx index d998680..636a81b 100644 --- a/app/(main)/playlist/[id]/page.tsx +++ b/app/(main)/playlist/[id]/page.tsx @@ -1,5 +1,6 @@ import { getPlaylistById } from "@/api/queries"; import PlaylistVideos from "@/components/playlist"; +import { notFound, redirect } from "next/navigation"; interface IParams { params: { @@ -12,6 +13,10 @@ const Page = async ({ params }: IParams) => { const videos = await getPlaylistById(id); + if (videos?.data?.length === 0) { + notFound(); + } + return (
- {data.desc} -
- ) : null} + if (isFetching) + return ( ++ {data?.data.desc} +
+ ) : null} + + {data?.data?.aydym_com_url || + data?.data?.horjun_content_url || + data?.data?.belet_url ? ( +