fix: ltr style of phonenumber in layout

This commit is contained in:
Sajad Mirjalili
2025-09-14 13:41:26 +03:30
parent 7267b6033f
commit a42da2d4c4
3 changed files with 12 additions and 6 deletions

View File

@@ -2,7 +2,7 @@ import { Box, IconButton, Typography } from '@mui/material';
import { Icon } from '@rkheftan/harmony-ui'; import { Icon } from '@rkheftan/harmony-ui';
import { More } from 'iconsax-react'; import { More } from 'iconsax-react';
import type { UserInfo } from '@/contexts/AuthContext'; import type { UserInfo } from '@/contexts/AuthContext';
import { LTRBox } from '../common/LTRBox'; import { LTRTypography } from '../common/LTRTypography';
interface HeaderProps { interface HeaderProps {
user: UserInfo; user: UserInfo;
@@ -21,9 +21,9 @@ export const Header: React.FC<HeaderProps> = ({ user }) => {
> >
<Box> <Box>
<Typography variant="body1">{user.fullName}</Typography> <Typography variant="body1">{user.fullName}</Typography>
<Typography variant="body2" component="span" color="textSecondary"> <LTRTypography variant="body2" color="textSecondary">
<LTRBox>{user.phoneNumber ?? user.email}</LTRBox> {user.phoneNumber ?? user.email}
</Typography> </LTRTypography>
</Box> </Box>
<IconButton> <IconButton>

View File

@@ -0,0 +1,6 @@
import { styled, Typography } from '@mui/material';
export const LTRTypography = styled(Typography)`
/* @noflip */
direction: ltr;
`;

View File

@@ -28,8 +28,8 @@ interface SettingsState {
} }
const languageOptions = [ const languageOptions = [
{ code: 'en', label: 'English', apiValue: 1 }, { code: 'fa', label: 'فارسی', apiValue: 1 },
{ code: 'fa', label: 'فارسی', apiValue: 2 }, { code: 'en', label: 'English', apiValue: 2 },
]; ];
const calendarOptions: { key: CalendarType; apiValue: number }[] = [ const calendarOptions: { key: CalendarType; apiValue: number }[] = [