Vercel/app/about/page.tsx
Strtus 8e6df1e70c Simplify About page to title, subhead, and description only.
Remove avatar/hero photos and gallery stats from the public About view and admin editor, and add env-backed defaults for ABOUT_TITLE and ABOUT_SUBHEAD.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-20 17:16:31 +08:00

42 lines
1.1 KiB
TypeScript

import AboutPageClient from '@/about/AboutPageClient';
import { getAboutDataCached } from '@/about/data';
import {
ABOUT_DESCRIPTION_DEFAULT,
ABOUT_SUBHEAD,
ABOUT_TITLE,
SHOW_ABOUT_PAGE,
} from '@/app/config';
import { PATH_ROOT } from '@/app/path';
import { safelyParseFormattedHtml } from '@/utility/html';
import { redirect } from 'next/navigation';
export const dynamic = 'force-static';
export default async function AboutPage() {
if (!SHOW_ABOUT_PAGE) { redirect(PATH_ROOT); }
const { about } = await getAboutDataCached()
.catch(() => ({ about: undefined }));
const title = about?.title || ABOUT_TITLE;
const subhead = about?.subhead || ABOUT_SUBHEAD;
const description = about?.description || ABOUT_DESCRIPTION_DEFAULT;
const descriptionHtml = description
? <div
className="text-medium leading-relaxed [&>*>a]:underline space-y-4"
dangerouslySetInnerHTML={{
__html: safelyParseFormattedHtml(description),
}}
/>
: undefined;
return (
<AboutPageClient
title={title}
subhead={subhead}
descriptionHtml={descriptionHtml}
/>
);
}