refactor: remove unused props from components and improve error handling in about page (#385)

This commit is contained in:
Katsuyuki Karasawa
2025-04-08 22:44:52 +09:00
committed by GitHub
parent c8142d0ac5
commit 7ea2f7f40f
8 changed files with 11 additions and 12 deletions

View File

@@ -6,10 +6,15 @@ import { getEntry } from 'astro:content'
import { i18n } from '../i18n/translation'
import I18nKey from '../i18n/i18nKey'
import Markdown from '@components/misc/Markdown.astro'
import { render } from 'astro:content'
const aboutPost = await getEntry('spec', 'about')
const { Content } = await aboutPost.render()
if (!aboutPost) {
throw new Error("About page content not found");
}
const { Content } = await render(aboutPost)
---
<MainGridLayout title={i18n(I18nKey.about)} description={i18n(I18nKey.about)}>
<div class="flex w-full rounded-[var(--radius-large)] overflow-hidden relative min-h-32">