import { TooltipContent, TooltipTrigger } from "@radix-ui/react-tooltip"; import { TvMinimalPlay } from "lucide-react"; import Link from "next/link"; import type { YoutubeLiveInfo } from "@/app/api/live/route"; import Image from "@/components/image"; import { Button } from "@/components/ui/button"; import { Tooltip } from "@/components/ui/tooltip"; export async function LiveButton() { const live: YoutubeLiveInfo = await fetch(`http://localhost:3000/api/live`) .then((e) => e.json()) .catch(() => "none"); if (live === "none") return; const { url, thumbnails, title } = live; const targetWidth = 220; return (
yt thumbnail
{title}
); }