import type { Metadata } from "next"; import config from "@payload-config"; import { getPayload } from "payload"; import { headers as nextHeaders } from "next/headers"; import { redirect } from "next/navigation"; import { MinigameComingSoon } from "@/components/frontend/minigames/MinigameComingSoon"; import { PhasingOutBanner } from "@/components/frontend/minigames/PhasingOutBanner"; import { getMinigameReleaseState } from "@/lib/minigames/loadRegistry"; import { ScrollText } from "lucide-react"; import { OpordArena } from "@/components/frontend/minigames/opord/OpordArena"; import { PeriodStandingsCard } from "@/components/frontend/minigames/PeriodStandingsCard"; export const metadata: Metadata = { title: "OPORD Recall (Polaris Task Force)", description: "Study a live operations order, then recall the details under pressure.", }; export default async function OpordPage() { const headers = await nextHeaders(); const payloadConfig = await config; const payload = await getPayload({ config: payloadConfig }); const { user } = await payload.auth({ headers, canSetHeaders: false }); if (!user) { redirect(`/login?returnTo=${encodeURIComponent("/minigames/opord")}`); } const release = await getMinigameReleaseState(payload, "opord"); if (release.upcoming && release.game) { return ; } const profileRes = await payload.find({ collection: "profiles", where: { user: { equals: user.id as number } }, limit: 1, depth: 0, overrideAccess: true, select: { progression: { minigames: true, }, }, }); const opordRecall = profileRes.docs[0]?.progression?.minigames?.opordRecall ?? {}; const stats = { gamesPlayed: opordRecall.gamesPlayed ?? 0, bestScore: opordRecall.bestScore ?? 0, bestAccuracy: opordRecall.bestAccuracy ?? 0, recruitBestScore: opordRecall.recruitBestScore ?? 0, veteranBestScore: opordRecall.veteranBestScore ?? 0, eliteBestScore: opordRecall.eliteBestScore ?? 0, opordRecallXp: opordRecall.xpEarned ?? 0, xpEarned: 0, score: 0, accuracy: 0, }; return (
{release.game?.status === "phasingOut" && ( )}

OPORD Recall

Study a live operations order, then recall the details under pressure.

Anchored period standings

); }