mirror of
https://github.com/status-im/nimbus-gui.git
synced 2025-01-25 02:39:27 +00:00
Update LogsPage.tsx
This commit is contained in:
parent
6b96577468
commit
01ab375a1c
@ -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} />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user