From 2f99f8f5587531cce61c184805cd2fbd0fc1b81b Mon Sep 17 00:00:00 2001 From: Sam Becker Date: Sun, 1 Mar 2026 23:29:16 -0600 Subject: [PATCH] Fix about default description behavior --- app/about/page.tsx | 5 ++--- src/about/AdminAboutEditPage.tsx | 5 +++-- src/about/index.ts | 6 ------ 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/app/about/page.tsx b/app/about/page.tsx index 874da7cb..17d84e00 100644 --- a/app/about/page.tsx +++ b/app/about/page.tsx @@ -1,7 +1,6 @@ -import { getDescriptionWithFallback } from '@/about'; import AboutPageClient from '@/about/AboutPageClient'; import { getAboutDataCached } from '@/about/data'; -import { SHOW_ABOUT_PAGE } from '@/app/config'; +import { ABOUT_DESCRIPTION_DEFAULT, SHOW_ABOUT_PAGE } from '@/app/config'; import { PATH_ROOT } from '@/app/path'; import { getDataForCategoriesCached } from '@/category/cache'; import { @@ -42,7 +41,7 @@ export default async function AboutPage() { getDataForCategoriesCached().catch(() => (NULL_CATEGORY_DATA)), ]); - const description = getDescriptionWithFallback(about); + const description = about?.description || ABOUT_DESCRIPTION_DEFAULT; const descriptionHtml = description ?
setAboutForm(form => ({ ...form, description }))} /> diff --git a/src/about/index.ts b/src/about/index.ts index 9f8605d4..4d1f71bc 100644 --- a/src/about/index.ts +++ b/src/about/index.ts @@ -1,5 +1,3 @@ -import { ABOUT_DESCRIPTION_DEFAULT } from '@/app/config'; - export interface AboutInsert { id: number title?: string @@ -13,7 +11,3 @@ export interface About extends AboutInsert { createdAt: Date updatedAt: Date } - -export const getDescriptionWithFallback = (about?: About) => - about?.description || - ABOUT_DESCRIPTION_DEFAULT;