refactor(route): ♻️ renames route parameter to fit real behaviour

This commit is contained in:
Julien Oculi 2024-07-01 13:18:54 +02:00
parent 5e2acb0eb8
commit b71d2c6aae

View file

@ -1,8 +1,8 @@
import { PageProps } from '$fresh/server.ts' import { PageProps } from '$fresh/server.ts'
import { BlogCard, blogMock } from '../../components/BlogCard.tsx' import { BlogCard, blogMock } from ':components/BlogCard.tsx'
export default function Projet({ params }: PageProps) { export default function Projet({ params }: PageProps) {
const article = blogMock.at(Number(params.id)) const article = blogMock.filter(blogEntry => blogEntry.name === params.name)[0]
return ( return (
article ? BlogCard(article) : <h3>Article inconnu</h3> article ? BlogCard(article) : <h3>Article inconnu</h3>