Skip to content

Commit

Permalink
Always enable Ayah menu for reading view
Browse files Browse the repository at this point in the history
  • Loading branch information
osamasayed committed Dec 16, 2024
1 parent 2c51849 commit 198ba19
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/components/dls/QuranWord/QuranWord.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,13 @@ const QuranWord = ({
1. When the current character is of type Word.
2. When it's allowed to have word by word (won't be allowed for search results as of now).
3. When the tooltip settings are set to either translation or transliteration or both.
3. When in translation view: the tooltip settings are set to either translation or transliteration or both.
When in reading view: always show tooltip.
*/
const showTooltip =
word.charTypeName === CharType.Word && isWordByWordAllowed && !!showTooltipFor.length;
word.charTypeName === CharType.Word &&
isWordByWordAllowed &&
(readingPreference === ReadingPreference.Translation ? !!showTooltipFor.length : true);
const translationViewTooltipContent = useMemo(
() => (isWordByWordAllowed ? getTooltipText(showTooltipFor, word) : null),
[isWordByWordAllowed, showTooltipFor, word],
Expand Down

0 comments on commit 198ba19

Please sign in to comment.