chore: commit pending ZXDB explorer changes prior to index perf work
Context - Housekeeping commit to capture all current ZXDB Explorer work before index-page performance optimizations. Includes - Server-rendered entry detail page with ISR and parallelized DB queries. - Node runtime for ZXDB API routes and params validation updates for Next 15. - ZXDB repository extensions (facets, label queries, category queries). - Cross-linking and Link-based prefetch across ZXDB UI. - Cache headers on low-churn list APIs. Notes - Follow-up commit will focus specifically on speeding up index pages via SSR initial data and ISR. Signed-off-by: Junie@lucy.xalior.com
This commit is contained in:
@@ -1,8 +1,19 @@
|
||||
import LabelDetailClient from "./LabelDetail";
|
||||
import { getLabelById, getLabelAuthoredEntries, getLabelPublishedEntries } from "@/server/repo/zxdb";
|
||||
|
||||
export const metadata = { title: "ZXDB Label" };
|
||||
|
||||
export const revalidate = 3600;
|
||||
|
||||
export default async function Page({ params }: { params: Promise<{ id: string }> }) {
|
||||
const { id } = await params;
|
||||
return <LabelDetailClient id={Number(id)} />;
|
||||
const numericId = Number(id);
|
||||
const [label, authored, published] = await Promise.all([
|
||||
getLabelById(numericId),
|
||||
getLabelAuthoredEntries(numericId, { page: 1, pageSize: 20 }),
|
||||
getLabelPublishedEntries(numericId, { page: 1, pageSize: 20 }),
|
||||
]);
|
||||
|
||||
// Let the client component handle the "not found" simple state
|
||||
return <LabelDetailClient id={numericId} initial={{ label: label as any, authored: authored as any, published: published as any }} />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user