Skip to content

Commit

Permalink
fix(error_book): correct WordPronunciationIcon props for pronunciatio…
Browse files Browse the repository at this point in the history
…n 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
  • Loading branch information
baekilda authored Aug 14, 2024
1 parent c43068a commit 30291ef
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pages/ErrorBook/RowDetail/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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}
/>
Expand Down

0 comments on commit 30291ef

Please sign in to comment.