feat: update content
This commit is contained in:
parent
5a98111911
commit
6bb8c947a3
44 changed files with 696 additions and 268 deletions
35
app/research/about/[id]/page.tsx
Normal file
35
app/research/about/[id]/page.tsx
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
import { Metadata } from 'next'
|
||||
|
||||
import { getArtifact, getArtifacts } from '@utils'
|
||||
|
||||
import styles from './page.module.css'
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: 'chora studio | research',
|
||||
}
|
||||
|
||||
export const generateStaticParams = () => {
|
||||
return getArtifacts('about')
|
||||
}
|
||||
|
||||
const ArtifactPage = async ({ params }: any) => {
|
||||
const artifact = await getArtifact('about', params.id)
|
||||
return (
|
||||
<div className={styles.page}>
|
||||
<div className={styles.banner}>
|
||||
<div>
|
||||
<p>{`author: ${artifact.author}`}</p>
|
||||
<p>{`title: ${artifact.title}`}</p>
|
||||
<p>{`description: ${artifact.description}`}</p>
|
||||
<p>{`created: ${artifact.created.toDateString()}`}</p>
|
||||
<p>{`updated: ${artifact.updated.toDateString()}`}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div className={styles.content}>
|
||||
<div dangerouslySetInnerHTML={{ __html: artifact.content }} />
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default ArtifactPage
|
||||
Loading…
Add table
Add a link
Reference in a new issue