From f23a8a9fca920b73094d783a97d9dda03028526d Mon Sep 17 00:00:00 2001 From: Koosha Lahouti Date: Wed, 6 Aug 2025 14:34:29 -0700 Subject: [PATCH] fix: styles --- .../activeDevices/ActiveDevices.tsx | 221 +++++++++--------- .../components/security/RecentLogins.tsx | 131 ++++++----- src/features/profile/routes/SettingPage.tsx | 8 +- 3 files changed, 188 insertions(+), 172 deletions(-) diff --git a/src/features/profile/components/activeDevices/ActiveDevices.tsx b/src/features/profile/components/activeDevices/ActiveDevices.tsx index 941d3d7..ef95546 100644 --- a/src/features/profile/components/activeDevices/ActiveDevices.tsx +++ b/src/features/profile/components/activeDevices/ActiveDevices.tsx @@ -1,4 +1,10 @@ -import { Box, Typography, Button } from '@mui/material'; +import { + Box, + Typography, + Button, + useTheme, + useMediaQuery, +} from '@mui/material'; import { useTranslation } from 'react-i18next'; import { DeviceMessage, Logout } from 'iconsax-react'; import Logo from '@/components/Logo'; @@ -38,6 +44,8 @@ export function ActiveDevices() { current: false, }, ]; + const theme = useTheme(); + const isXsup = useMediaQuery(theme.breakpoints.up('xs')); return ( @@ -75,118 +83,123 @@ export function ActiveDevices() { }} > {devices.map((device) => ( - - - {device.timeAndDate} - - + <> - - - {device.deviceModel} - - - - - {device.ip} - - - - {device.current && ( - - )} - - - - + {device.timeAndDate} + + + + + + {device.deviceModel} + + + + + {device.ip} + + + + {device.current && ( + + )} + + + + + - + {isXsup && ( + + )} + ))} diff --git a/src/features/profile/components/security/RecentLogins.tsx b/src/features/profile/components/security/RecentLogins.tsx index 69911a1..adf3910 100644 --- a/src/features/profile/components/security/RecentLogins.tsx +++ b/src/features/profile/components/security/RecentLogins.tsx @@ -46,75 +46,78 @@ export function RecentLogins() { > {data.map((d) => ( - - - {d.time} - - - {d.device} - - - {d.ip} - + <> - {d.current && ( - - )} + + {d.time} + + + {d.device} + + + {d.ip} + + + {d.current && ( + + )} + - + + ))} diff --git a/src/features/profile/routes/SettingPage.tsx b/src/features/profile/routes/SettingPage.tsx index b6e7c7d..3c8069f 100644 --- a/src/features/profile/routes/SettingPage.tsx +++ b/src/features/profile/routes/SettingPage.tsx @@ -69,9 +69,6 @@ export function Layout() { const location = useLocation(); const { t } = useTranslation('sideMap'); const [drawerOpen, setDrawerOpen] = useState(false); - - const contentMaxWidth = '100%'; - // const contentWidthMd = '810px'; const navWidthMd = '274px'; const navConfig: NavItemConfig[] = [ @@ -197,13 +194,16 @@ export function Layout() { > {!isMdUp && (