diff --git a/src/pages/Dashboard/DashboardContent.tsx b/src/pages/Dashboard/DashboardContent.tsx index 5895d1a2..4977edfd 100644 --- a/src/pages/Dashboard/DashboardContent.tsx +++ b/src/pages/Dashboard/DashboardContent.tsx @@ -12,61 +12,75 @@ import StorageCard from './StorageCard/StorageCard' import NetworkCard from './NetworkCard/NetworkCard' import SyncStatusCard from './SyncStatusCards/SyncStatusCards' import MemoryCard from './MemoryCard/MemoryCard' -const DashboardContent = () => ( - - +import { useEffect, useState } from 'react' +const DashboardContent = () => { + const [windowWidth, setWindowWidth] = useState(window.innerWidth); + + useEffect(() => { + const handleResize = () => { + setWindowWidth(window.innerWidth); + }; + + window.addEventListener('resize', handleResize); + return () => { + window.removeEventListener('resize', handleResize); + }; + }, []); + return ( + + + +
-
- - - -
- + +
- - - - - - - - + - - - - - - - - - - - -
-) + + + + + + + + + + + + + + + + + + + + +
+ ) +} export default DashboardContent