Files
portfolio/src/widgets/IntroSection/ui/IntroSection/IntroSection.tsx
T
Ilia Mashkov cb3bdce24a feat: tag all PocketBase fetches for ISR cache invalidation
Each getCollection/getFirstRecord call now passes the collection name
as a cache tag so revalidateTag can target individual collections.
2026-05-18 21:34:43 +03:00

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} />;
}