From 71d1029f857c3ad0d9eb2f492f81dfae4143a535 Mon Sep 17 00:00:00 2001 From: 0x1eef <0x1eef@protonmail.com> Date: Mon, 25 Mar 2024 04:58:51 -0300 Subject: [PATCH] Hide for non-rtl locale --- src/js/components/SurahIndex.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/js/components/SurahIndex.tsx b/src/js/components/SurahIndex.tsx index 939e616..1ceea4d 100644 --- a/src/js/components/SurahIndex.tsx +++ b/src/js/components/SurahIndex.tsx @@ -17,6 +17,7 @@ export function SurahIndex({ locale, surahs, t }: Props) { const [theme, setTheme] = useTheme(); const [index, setIndex] = useState(surahs); const ref = useRef(); + const ltr = locale === "en"; useEffect(() => { if (ref.current) { @@ -63,8 +64,8 @@ export function SurahIndex({ locale, surahs, t }: Props) { className="flex flex-row items-center no-underline" href={`/${locale}/random/`} > - - {t(locale, "ChooseRandomChapter")} + {ltr && } + {t(locale, "ChooseRandomChapter")}