fix: ltr style of phonenumber in layout
This commit is contained in:
@@ -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>
|
||||||
|
|||||||
6
src/components/common/LTRTypography.tsx
Normal file
6
src/components/common/LTRTypography.tsx
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
import { styled, Typography } from '@mui/material';
|
||||||
|
|
||||||
|
export const LTRTypography = styled(Typography)`
|
||||||
|
/* @noflip */
|
||||||
|
direction: ltr;
|
||||||
|
`;
|
||||||
@@ -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 }[] = [
|
||||||
|
|||||||
Reference in New Issue
Block a user