refactor: remove unused props from components and improve error handling in about page (#385)
This commit is contained in:
committed by
GitHub
parent
c8142d0ac5
commit
7ea2f7f40f
@@ -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">
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
---
|
||||
import path from 'node:path'
|
||||
import { getCollection } from 'astro:content'
|
||||
import License from '@components/misc/License.astro'
|
||||
import Markdown from '@components/misc/Markdown.astro'
|
||||
import I18nKey from '@i18n/i18nKey'
|
||||
|
||||
Reference in New Issue
Block a user