"use client"; import { useRef, useState } from "react"; import { audioFileFor } from "@/lib/audio"; // A word or short sentence with a plain play button for its pronunciation clip (public/audio, made by scripts/make-audio.mjs) export function Say({ word, hint }: { word: string; hint?: string }) { const audio = useRef(null); const [playing, setPlaying] = useState(false); const play = () => { const el = audio.current; if (!el) return; el.currentTime = 0; void el.play(); }; return ( {word} {hint && {hint}} ); }