Extend Filter.tsx to cover locale-specific numbers, too
This commit is contained in:
parent
f71a89a0f7
commit
3b0e06885c
1 changed files with 3 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
import React from "react";
|
||||
import { TFunction } from "~/lib/t";
|
||||
import { TFunction, formatNumber } from "~/lib/t";
|
||||
import type { Surah, TLocale } from "Quran";
|
||||
|
||||
type Props = {
|
||||
|
@ -22,7 +22,8 @@ export function Filter({ locale, t, setIndex, surahs }: Props) {
|
|||
surah =>
|
||||
regexp.test(surah.name) ||
|
||||
regexp.test(surah.roman.name) ||
|
||||
regexp.test(String(surah.id)),
|
||||
regexp.test(String(surah.id)) ||
|
||||
regexp.test(formatNumber(locale, surah.id))
|
||||
);
|
||||
setIndex(newIndex);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue