import { useState } from 'react'; import { WordGroupManager } from '../components/WordGroupManager/WordGroupManager'; import { Link } from 'react-router-dom'; import { speechSoundsApi } from '../services/apiClient'; export function SpeechSoundsAdminPage() { const [clearingCache, setClearingCache] = useState(false); const [cacheMessage, setCacheMessage] = useState(null); const handleClearCache = async () => { if (!confirm('Are you sure you want to clear all cached pronunciations? Words will regenerate with new settings on next play.')) { return; } try { setClearingCache(true); setCacheMessage(null); await speechSoundsApi.clearPronunciationsCache(); setCacheMessage('Pronunciation cache cleared successfully!'); setTimeout(() => setCacheMessage(null), 3000); } catch (err: any) { setCacheMessage(err.error?.message || 'Failed to clear cache'); setTimeout(() => setCacheMessage(null), 5000); } finally { setClearingCache(false); } }; return (
← Back to Admin

Speech Sounds - Word Groups

Manage word groups for speech sound practice

{cacheMessage && (
{cacheMessage}
)}
); }