fp/services/next/app/vt/page.tsx

36 lines
1.0 KiB
TypeScript
Raw Normal View History

2024-01-20 16:16:14 +00:00
import { notFound } from 'next/navigation'
import VTuberCard from '../components/vtuber-card'
2024-07-10 22:11:18 +00:00
import { getVtubers } from '../lib/vtubers'
2024-07-15 16:07:04 +00:00
import { IVtuber } from '@futureporn/types'
2024-01-20 16:16:14 +00:00
export default async function Page() {
const vtubers = await getVtubers()
if (!vtubers) notFound()
// return (
// <pre>
// <code>
// {JSON.stringify(vtubers, null, 2)}
// </code>
// </pre>
// )
return (
<>
2024-12-12 07:23:46 +00:00
{/* <pre>
<code>
{JSON.stringify(vtubers, null, 2)}
</code>
</pre> */}
2024-01-20 16:16:14 +00:00
<div className="content">
<div className="section">
<h1 className="title">VTubers</h1>
<nav className="columns is-multiline">
2024-12-12 07:23:46 +00:00
{vtubers.map((vtuber: IVtuber) =>
2024-01-20 16:16:14 +00:00
<VTuberCard key={vtuber.id} {...vtuber} />
)}
</nav>
</div>
</div>
</>
)
}