"use client"; import DisabledNotice from "@/components/disabled-notice"; import { FEATURES } from "@/lib/features"; import { useEffect, useState } from "react"; import Link from "next/link"; import { apiFetch } from "@/lib/api"; /* Playreel 전용 아카이브. * (ado2) 그룹의 /archive 로 보내면 독립 셸이 깨진다 — 같은 데이터를 여기서 보여주고 * playreel 갈래만 걸러낸다. 저장소는 공유다(요금 기획서 §8-⑤ 권장: 통합 유지). */ type Entry = { slug: string; kind?: string; name: string; poster_url?: string | null; video_url?: string | null; thumbnail_url?: string | null; version?: number | null; credits_used?: number | null; source?: { url?: string } | null; created_at?: number; }; function PlayreelArchivePageInner() { const [items, setItems] = useState(null); const [error, setError] = useState(null); useEffect(() => { apiFetch("/api/archive") // kind 가 없던 옛 엔트리는 source 유무로 추정한다(프론트 archiveKind 와 같은 규칙) .then((all) => setItems(all.filter((e) => e.kind === "playreel" || (!e.kind && e.source)))) .catch((e) => setError((e as Error).message)); }, []); return (

아카이브

완성한 예고편이 여기 쌓입니다. 버전은 덮어쓰지 않습니다.

{error &&

{error}

} {items && items.length === 0 && (

아직 완성한 예고편이 없습니다. 첫 예고편 만들기 →

)} {items && items.length > 0 && (
{items.map((e) => (
{e.video_url ? (
))}
)}
); } export default function PlayreelArchivePage() { if (!FEATURES.archive) return ; return ; }