refactor(route): ♻️ renames route parameter to fit real behaviour
This commit is contained in:
parent
5e2acb0eb8
commit
b71d2c6aae
|
@ -1,8 +1,8 @@
|
|||
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) {
|
||||
const article = blogMock.at(Number(params.id))
|
||||
const article = blogMock.filter(blogEntry => blogEntry.name === params.name)[0]
|
||||
|
||||
return (
|
||||
article ? BlogCard(article) : <h3>Article inconnu</h3>
|
Loading…
Reference in a new issue