diff --git a/src/hooks/useScreenSize.ts b/src/hooks/useScreenSize.ts index 40db713..a392927 100644 --- a/src/hooks/useScreenSize.ts +++ b/src/hooks/useScreenSize.ts @@ -24,7 +24,7 @@ export const useScreenSize = () => { const handleResize = () => { setScreenSize((prev) => ({ ...prev, - height: window.innerHeight - 120, + height: window.innerHeight - 100, })); }; diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 0fdb308..f728e12 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -81,10 +81,13 @@ export default function GameAnalysis() { maxWidth: "1200px", }} rowGap={2} - maxHeight={{ lg: "calc(95vh - 80px)", xs: "900px" }} + maxHeight={{ lg: "calc(95vh - 60px)", xs: "900px" }} display="grid" - gridTemplateRows="repeat(3, auto) fit-content(100%)" - marginTop={isLgOrGreater && window.innerHeight > 780 ? 4 : 0} + gridTemplateRows={ + gameEval + ? "repeat(2, auto) max-content fit-content(100%) fit-content(100%) auto" + : "repeat(3, auto) fit-content(100%)" + } size={{ xs: 12, lg: "grow", @@ -96,77 +99,91 @@ export default function GameAnalysis() { )} + {isLgOrGreater && } + {!isLgOrGreater && !gameEval && } {!isLgOrGreater && !gameEval && ( )} - - setTab(newValue)} - aria-label="basic tabs example" - variant="fullWidth" - sx={{ minHeight: 0 }} + {!isLgOrGreater && ( + - } - iconPosition="start" - sx={{ - textTransform: "none", - minHeight: 15, - padding: "5px 0em 12px", - }} - disableFocusRipple - /> + setTab(newValue)} + aria-label="basic tabs example" + variant="fullWidth" + sx={{ minHeight: 0 }} + > + } + iconPosition="start" + sx={{ + textTransform: "none", + minHeight: 15, + padding: "5px 0em 12px", + }} + disableFocusRipple + /> - } - iconPosition="start" - sx={{ - textTransform: "none", - minHeight: 15, - display: isGameLoaded ? undefined : "none", - padding: "5px 0em 12px", - }} - disableFocusRipple - /> + } + iconPosition="start" + sx={{ + textTransform: "none", + minHeight: 15, + display: isGameLoaded ? undefined : "none", + padding: "5px 0em 12px", + }} + disableFocusRipple + /> - } - iconPosition="start" - sx={{ - textTransform: "none", - minHeight: 15, - display: gameEval ? undefined : "none", - padding: "5px 0em 12px", - }} - disableFocusRipple - /> - - + } + iconPosition="start" + sx={{ + textTransform: "none", + minHeight: 15, + display: gameEval ? undefined : "none", + padding: "5px 0em 12px", + }} + disableFocusRipple + /> + + + )} -