import Link from "next/link"; import { connection } from "next/server"; import { SiteFooter } from "@/components/public/site-footer"; import { SiteHeader } from "@/components/public/site-header"; import { StygianGuide } from "@/components/public/stygian-guide"; import { LiveRefresh } from "@/components/live-refresh"; import { Empty, EmptyDescription, EmptyHeader, EmptyTitle } from "@/components/ui/empty"; import { Button } from "@/components/ui/button"; import { getCachedStygianSchedule, getCachedStygianSchedules } from "@/lib/cache/stygian"; import { getActiveCatalog } from "@/lib/guides/queries"; export const instant = false; export default async function StygianPage({ searchParams }: { searchParams: Promise> }) { await connection(); const query = await searchParams; const schedules = await getCachedStygianSchedules(); const rawSchedule = Array.isArray(query.schedule) ? query.schedule[0] : query.schedule; const requestedId = Number(rawSchedule); const selectedId = schedules.some((entry) => entry.scheduleId === requestedId) ? requestedId : schedules[0]?.scheduleId; const [schedule, catalog] = await Promise.all([selectedId ? getCachedStygianSchedule(selectedId) : null, getActiveCatalog()]); return (

Stygian Onslaught

Stygian Guide

{schedules.length ? : null} {schedule && catalog ? : ( No Stygian versions yetAn administrator must sync the Lunaris archive first. )}
); }