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;