Update LogsPage.tsx

This commit is contained in:
Hristo Nedelkov 2023-11-16 12:11:07 +02:00
parent 6b96577468
commit 01ab375a1c

View File

@ -6,8 +6,21 @@ import RightSidebar from '../../components/General/RightSideBar/RightSidebar'
import LogsTerminal from './LogsTerminal' import LogsTerminal from './LogsTerminal'
import LogsSumCard from './LogsSumCard' import LogsSumCard from './LogsSumCard'
import SupportCard from './SupportCard' import SupportCard from './SupportCard'
import { useEffect, useState } from 'react'
const LogsPage = () => { const LogsPage = () => {
const [windowWidth, setWindowWidth] = useState(window.innerWidth)
useEffect(() => {
const handleResize = () => {
setWindowWidth(+window.innerWidth)
}
window.addEventListener('resize', handleResize)
return () => {
window.removeEventListener('resize', handleResize)
}
}, [])
return ( return (
<XStack style={{ height: '100vh' }}> <XStack style={{ height: '100vh' }}>
<LeftSidebar /> <LeftSidebar />
@ -26,7 +39,7 @@ const LogsPage = () => {
> >
<TitleLogo /> <TitleLogo />
<Stack style={{ width: '100%', alignItems: 'center' }}> <Stack style={{ width: '100%', alignItems: 'center' }}>
<LogsTerminal /> <LogsTerminal windowWidth={windowWidth}/>
<XStack space="$4"> <XStack space="$4">
<LogsSumCard type={'Critical'} count={16} countActive={2} countInactive={3} /> <LogsSumCard type={'Critical'} count={16} countActive={2} countInactive={3} />
<LogsSumCard type={'Warning'} count={9} countActive={2} countInactive={7} /> <LogsSumCard type={'Warning'} count={9} countActive={2} countInactive={7} />