import Link from "next/link"; import { prisma } from "@streamclipper/db"; import { addChannel, toggleChannelActive, toggleAllChannels, checkChannelNow } from "./actions"; import { fetchChannelStatuses } from "../lib/apiDaemon"; import { formatTr } from "../lib/formatDate"; import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; import { Badge } from "@/components/ui/badge"; import { Card, CardContent, CardHeader, CardTitle, CardFooter } from "@/components/ui/card"; import { cn } from "@/lib/utils"; export const dynamic = "force-dynamic"; export default async function DashboardPage() { const [channels, statuses] = await Promise.all([ prisma.channel.findMany({ orderBy: { name: "asc" }, include: { sessions: { where: { endedAt: null }, orderBy: { startedAt: "desc" }, take: 1, }, }, }), fetchChannelStatuses(), ]); return (
Henüz kanal eklenmedi.
) : (