/* eslint-disable @next/next/no-img-element */ import { cosmic } from "@/cosmic/client"; import { notFound } from "next/navigation"; import { VideoList } from "@/cosmic/blocks/videos/VideoList"; export async function SingleChannel({ query, className, status, }: { query: any; className?: string; status?: "draft" | "published" | "any"; }) { try { const { object: channel } = await cosmic.objects .findOne(query) .props("id,slug,title,metadata,created_at") .depth(1) .status(status ? status : "published"); return (
{channel.title}
{channel.title}

{channel.title}

About

Videos

); } catch (e: any) { if (e.status === 404) return notFound(); } }