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 { More } from 'iconsax-react';
|
||||
import type { UserInfo } from '@/contexts/AuthContext';
|
||||
import { LTRBox } from '../common/LTRBox';
|
||||
import { LTRTypography } from '../common/LTRTypography';
|
||||
|
||||
interface HeaderProps {
|
||||
user: UserInfo;
|
||||
@@ -21,9 +21,9 @@ export const Header: React.FC<HeaderProps> = ({ user }) => {
|
||||
>
|
||||
<Box>
|
||||
<Typography variant="body1">{user.fullName}</Typography>
|
||||
<Typography variant="body2" component="span" color="textSecondary">
|
||||
<LTRBox>{user.phoneNumber ?? user.email}</LTRBox>
|
||||
</Typography>
|
||||
<LTRTypography variant="body2" color="textSecondary">
|
||||
{user.phoneNumber ?? user.email}
|
||||
</LTRTypography>
|
||||
</Box>
|
||||
|
||||
<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;
|
||||
`;
|
||||
Reference in New Issue
Block a user