website/routes/blog/[id].tsx

11 lines
290 B
TypeScript
Raw Normal View History

import { PageProps } from '$fresh/server.ts'
import { BlogCard, blogMock } from '../../components/BlogCard.tsx'
export default function Projet({ params }: PageProps) {
2024-06-06 16:38:52 +02:00
const article = blogMock.at(Number(params.id))
return (
2024-06-06 16:38:52 +02:00
article ? BlogCard(article) : <h3>Article inconnu</h3>
)
}