website/routes/machines/[id].tsx

11 lines
320 B
TypeScript

import { PageProps } from '$fresh/server.ts'
import { MachineCard, machineMock } from '../../components/MachineCard.tsx'
export default function Machine({ params }: PageProps) {
const machine = machineMock.at(Number(params.id))
return (
machine ? MachineCard(machine) : <h3>Machine pas encore disponible</h3>
)
}