'use client'; import { usePuzzles } from '@/lib/hooks/use-puzzles'; import AppLink from './AppLink'; import Icon from './Icon'; export default function Puzzles({ token }: { token: string }) { const { data, isLoading } = usePuzzles({ token }); console.log(data); return ( <> {(!isLoading && data?.chapters?.map((chapter) => (

Chapitre {chapter.id} - {chapter.name}

))) || (
{[...Array(3).keys()].map((i) => (
    {[...Array(6).keys()].map((j) => ( ))}
))}
)} ); }