import { notFound } from "next/navigation"; import AnnotateView from "@/components/pdf/AnnotateView"; const UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i; export const dynamic = "force-dynamic"; /** * หน้าอ่านเอกสาร (ฉบับ token 2026-10-30) — shell บาง ๆ ฝั่ง server (ตรวจ UUID * แล้วส่งต่อให้ client gate): AnnotateView ตรวจ access_token ใน localStorage → * ดึงข้อมูลเริ่มต้นผ่าน GET /api/note/files/[id]/bootstrap พร้อม Bearer → * PDFViewer · ไม่มี session = หน้า gate "กลับ e-Court กดลิงก์ใหม่" (แทน redirect * sso=required ของรอบ middleware ที่ถอดแล้ว) */ export default async function AnnotatePage({ params, }: { params: { id: string }; }) { const { id } = params; if (!UUID_RE.test(id)) notFound(); return ; }