fix: digits inputs in ltr mode
This commit is contained in:
@@ -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 () {
|
||||
|
||||
6364
package-lock 2.json
6364
package-lock 2.json
File diff suppressed because it is too large
Load Diff
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user