import { useEffect, useState } from "react"; import { useTranslation } from "@/hooks/useTranslation"; interface WordDisplayProps { currentWord: string; } export const WordDisplay = ({ currentWord }: WordDisplayProps) => { const [imageLoaded, setImageLoaded] = useState(false); const imagePath = `/think_in_sync_assets/${currentWord.toLowerCase()}.jpg`; const t = useTranslation(); useEffect(() => { const img = new Image(); img.onload = () => setImageLoaded(true); img.src = imagePath; console.log("Attempting to load image:", imagePath); }, [imagePath]); return (
{t.game.describeWord}
{currentWord}