From faa5f25a81c41ddf7452e236401ec766da8c7d5c Mon Sep 17 00:00:00 2001
From: 0x1eef <0x1eef@protonmail.com>
Date: Wed, 15 Mar 2023 18:48:55 -0300
Subject: [PATCH] Follow up 7f4c8f723df1282569461802d6a583965cc6e1ae
---
src/js/components/Stream.tsx | 6 +++---
src/js/pages/surah/index.tsx | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/js/components/Stream.tsx b/src/js/components/Stream.tsx
index 6cbabc9..2810708 100644
--- a/src/js/components/Stream.tsx
+++ b/src/js/components/Stream.tsx
@@ -1,6 +1,6 @@
import * as Quran from 'lib/Quran';
import React, { useEffect } from 'react';
-import { TFunction } from 'lib/i18n';
+import { formatNumber, TFunction } from 'lib/i18n';
import { Slice } from 'lib/Quran/Slice';
import classNames from 'classnames';
@@ -25,10 +25,10 @@ export function Stream({ surah, stream, locale, slice, endOfStream, isPaused, t
{t(locale, 'surah')}{' '}
- {surah.id.toLocaleString(locale)}
+ {formatNumber(surah.id, locale)}
{t(locale, 'comma')}{' '}
{t(locale, 'ayah')}{' '}
- {ayah.id.toLocaleString(locale)}
+ {formatNumber(ayah.id, locale)}
{ayah.text}
diff --git a/src/js/pages/surah/index.tsx b/src/js/pages/surah/index.tsx
index 65347ba..e42f58b 100644
--- a/src/js/pages/surah/index.tsx
+++ b/src/js/pages/surah/index.tsx
@@ -6,7 +6,7 @@ import * as Quran from 'lib/Quran';
import { SelectOption } from 'components/Select';
import { ThemeSelect } from 'components/ThemeSelect';
import { LanguageSelect } from 'components/LanguageSelect';
-import { i18n, TFunction } from 'lib/i18n';
+import { i18n, formatNumber, TFunction } from 'lib/i18n';
interface Props {
locale: Quran.Locale
@@ -35,7 +35,7 @@ function SurahIndex({ locale, surahs, t }: Props) {
- {surah.id.toLocaleString(locale)}
+ {formatNumber(surah.id, locale)}
{surah.localizedName}