From d227f7a5d996c6b06ddf8d79ca3511a2323d7657 Mon Sep 17 00:00:00 2001 From: IRBorisov <8611739+IRBorisov@users.noreply.github.com> Date: Fri, 4 Aug 2023 13:26:51 +0300 Subject: [PATCH] Fix window sizing issues --- rsconcept/frontend/src/App.tsx | 17 +++++++++++++++-- rsconcept/frontend/src/components/Footer.tsx | 2 +- .../src/pages/RSFormPage/EditorConstituenta.tsx | 4 +++- .../src/pages/RSFormPage/EditorItems.tsx | 13 ++++++++----- .../src/pages/RSFormPage/EditorTermGraph.tsx | 10 +++++++--- 5 files changed, 34 insertions(+), 12 deletions(-) diff --git a/rsconcept/frontend/src/App.tsx b/rsconcept/frontend/src/App.tsx index 9c702e2c..79a1201e 100644 --- a/rsconcept/frontend/src/App.tsx +++ b/rsconcept/frontend/src/App.tsx @@ -1,3 +1,4 @@ +import { useMemo } from 'react'; import { Route, Routes } from 'react-router-dom'; import Footer from './components/Footer'; @@ -18,6 +19,17 @@ import UserProfilePage from './pages/UserProfilePage'; function App () { const { noNavigation } = useConceptTheme(); + const scrollWindowSize = useMemo(() => { + return !noNavigation ? + 'max-h-[calc(100vh-4.5rem)]' + : 'max-h-[100vh]'; + }, [noNavigation]); + const mainSize = useMemo(() => { + return !noNavigation ? + 'min-h-[calc(100vh-12rem)]' + : 'min-h-[calc(100vh-8rem)] '; + }, [noNavigation]); + return (