fix(error_book): correct WordPronunciationIcon props for pronunciation functionality (#824)

- Added missing `lang` prop and corrected `word` prop type in `WordPronunciationIcon` component
- Ensured that the pronunciation feature works correctly by passing the correct language and word data
- Resolved issue where clicking on the pronunciation button played an "undefined" sound
This commit is contained in:
Baekilda
2024-08-14 16:26:21 +09:00
committed by GitHub
parent c43068ab79
commit 30291efd8c

View File

@@ -79,7 +79,8 @@ const RowDetail: React.FC<RowDetailProps> = ({ currentRowDetail, allRecords }) =
{word ? <Phonetic word={word} /> : <LoadingWordUI isLoading={isLoading} hasError={hasError} />}
{word && (
<WordPronunciationIcon
word={word.name}
lang={dictInfo.language}
word={word}
className="absolute -right-7 top-1/2 h-5 w-5 -translate-y-1/2 transform "
ref={wordPronunciationIconRef}
/>