From 01ab375a1ce484da91aa51c4bd6a9c463171752d Mon Sep 17 00:00:00 2001 From: Hristo Nedelkov Date: Thu, 16 Nov 2023 12:11:07 +0200 Subject: [PATCH] Update LogsPage.tsx --- src/pages/LogsPage/LogsPage.tsx | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/pages/LogsPage/LogsPage.tsx b/src/pages/LogsPage/LogsPage.tsx index 116e81dc..25775205 100644 --- a/src/pages/LogsPage/LogsPage.tsx +++ b/src/pages/LogsPage/LogsPage.tsx @@ -6,8 +6,21 @@ import RightSidebar from '../../components/General/RightSideBar/RightSidebar' import LogsTerminal from './LogsTerminal' import LogsSumCard from './LogsSumCard' import SupportCard from './SupportCard' +import { useEffect, useState } from 'react' const LogsPage = () => { + const [windowWidth, setWindowWidth] = useState(window.innerWidth) + + useEffect(() => { + const handleResize = () => { + setWindowWidth(+window.innerWidth) + } + + window.addEventListener('resize', handleResize) + return () => { + window.removeEventListener('resize', handleResize) + } + }, []) return ( @@ -26,7 +39,7 @@ const LogsPage = () => { > - +