website/routes/blog/[name].tsx

11 lines
318 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) {
const article = blogMock.filter(blogEntry => blogEntry.name === params.name)[0]
return (
2024-06-06 16:38:52 +02:00
article ? BlogCard(article) : <h3>Article inconnu</h3>
)
}