cb3bdce24a
Each getCollection/getFirstRecord call now passes the collection name as a cache tag so revalidateTag can target individual collections.
19 lines
493 B
TypeScript
19 lines
493 B
TypeScript
import { notFound } from 'next/navigation';
|
|
import type { PageContentRecord } from '$shared/api';
|
|
import { getFirstRecord } from '$shared/api';
|
|
import { RichText } from '$shared/ui';
|
|
|
|
/**
|
|
* Intro section component.
|
|
* Displays primary introduction content from PocketBase.
|
|
*/
|
|
export default async function IntroSection() {
|
|
const data = await getFirstRecord<PageContentRecord>('intro', { tags: ['intro'] });
|
|
|
|
if (!data) {
|
|
notFound();
|
|
}
|
|
|
|
return <RichText html={data.content} />;
|
|
}
|