fix: digits inputs in ltr mode

This commit is contained in:
Sajad Mirjalili
2025-09-26 16:23:49 +03:30
parent d4ee5114ab
commit 7d490cb084
3 changed files with 4 additions and 6366 deletions

View File

@@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<!-- <link rel="icon" type="image/svg+xml" href="/vite.svg" /> -->
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Harmony club</title>
<title>Harmony Accounts</title>
<!-- this script add for preventing initial theme flashing -->
<script>
(function () {

File diff suppressed because it is too large Load Diff

View File

@@ -7,6 +7,7 @@ import React, {
type KeyboardEvent,
} from 'react';
import { TextField, Stack } from '@mui/material';
import { useTranslation } from 'react-i18next';
interface DigitInputProps {
error: boolean;
@@ -20,6 +21,7 @@ const DigitInput: React.FC<DigitInputProps> = ({
success,
}) => {
const [code, setCode] = useState<string[]>(['', '', '', '']);
const { i18n } = useTranslation();
const inputRefs = useRef<Array<HTMLInputElement | null>>([]);
useEffect(() => {
@@ -78,7 +80,7 @@ const DigitInput: React.FC<DigitInputProps> = ({
return (
<Stack
direction="row-reverse"
direction={i18n.dir() == 'ltr' ? 'row' : 'row-reverse'}
alignItems="center"
sx={{ gap: 2, width: '100%', my: 4 }}
justifyContent="center"