import Link from "next/link"; import { prisma } from "@streamclipper/db"; import { addChannel } from "./actions"; import { fetchChannelStatuses } from "../lib/apiDaemon"; 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.
) : (| Kanal | Durum | Kayıt | Son Kontrol |
|---|---|---|---|
| {c.name}{" "} {c.youtubeHandle} | {c.isActive ? "Aktif" : "Pasif"} | {recording ? "🔴 Kayıtta" : "—"} {status?.lastPollError && ( hata )} | {c.lastCheckedAt ? new Date(c.lastCheckedAt).toLocaleString("tr-TR") : "—"} |