'use client'; import { usePuzzle } from '@/lib/hooks/use-puzzles'; import { notFound } from 'next/navigation'; import Button from './Button'; import Input from './Input'; import ToHTML from './ToHTML'; export default function Puzzle({ id }: { id: string }) { const { data: puzzle, isLoading } = usePuzzle(id); if (isLoading) { return <>; } if (!puzzle) { notFound(); } return (

{puzzle.name}

Chapitre {puzzle.chapter}

); }