refactor(auth): replace escaped persian digits
This commit is contained in:
@@ -1837,7 +1837,7 @@ function MobileRecordedEntryCard({
|
||||
</p>
|
||||
{project && (
|
||||
<span className="inline-flex min-w-0 items-center gap-2 text-xs">
|
||||
<span className="shrink-0 text-sky-600 dark:text-sky-400">{"\u2022"}</span>
|
||||
<span className="shrink-0 text-sky-600 dark:text-sky-400">{"•"}</span>
|
||||
<span className={`max-w-[10rem] truncate font-medium ${project.isDeleted ? "italic text-slate-500 dark:text-slate-400" : "text-sky-600 dark:text-sky-400"}`}>
|
||||
{project.isDeleted ? buildDeletedProjectLabel(project.name, deletedProjectLabel) : project.name}
|
||||
</span>
|
||||
|
||||
@@ -3,7 +3,7 @@ import { toast } from "sonner"
|
||||
import { ApiError } from "../../api/client"
|
||||
import { setSessionTokens } from "../../lib/session"
|
||||
|
||||
const PERSIAN_DIGITS = ["\u06f0", "\u06f1", "\u06f2", "\u06f3", "\u06f4", "\u06f5", "\u06f6", "\u06f7", "\u06f8", "\u06f9"]
|
||||
const PERSIAN_DIGITS = ["۰", "۱", "۲", "۳", "۴", "۵", "۶", "۷", "۸", "۹"]
|
||||
|
||||
export const localizeDigits = (value: string, isRtl: boolean) =>
|
||||
isRtl ? value.replace(/\d/g, (digit) => PERSIAN_DIGITS[Number.parseInt(digit, 10)] ?? digit) : value
|
||||
|
||||
Reference in New Issue
Block a user