From 167d169f1a37c3b831ce017769e47bf3093de0ad Mon Sep 17 00:00:00 2001 From: Daniel Date: Wed, 26 Nov 2025 00:44:06 +0100 Subject: [PATCH] chore: use a constant instead of a number --- webapp/app.ironcalc.com/frontend/src/App.tsx | 2 +- webapp/app.ironcalc.com/frontend/src/components/FileBar.tsx | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/webapp/app.ironcalc.com/frontend/src/App.tsx b/webapp/app.ironcalc.com/frontend/src/App.tsx index 2c6c000..2e5bae6 100644 --- a/webapp/app.ironcalc.com/frontend/src/App.tsx +++ b/webapp/app.ironcalc.com/frontend/src/App.tsx @@ -227,7 +227,7 @@ const Wrapper = styled("div")` `; const DRAWER_WIDTH = 264; -const MIN_MAIN_CONTENT_WIDTH_FOR_MOBILE = 768; +export const MIN_MAIN_CONTENT_WIDTH_FOR_MOBILE = 768; const MainContent = styled("div")<{ isDrawerOpen: boolean }>` margin-left: ${({ isDrawerOpen }) => diff --git a/webapp/app.ironcalc.com/frontend/src/components/FileBar.tsx b/webapp/app.ironcalc.com/frontend/src/components/FileBar.tsx index 7ce46b3..5b67142 100644 --- a/webapp/app.ironcalc.com/frontend/src/components/FileBar.tsx +++ b/webapp/app.ironcalc.com/frontend/src/components/FileBar.tsx @@ -3,6 +3,7 @@ import type { Model } from "@ironcalc/workbook"; import { IconButton, Tooltip } from "@mui/material"; import { CloudOff, PanelLeftClose, PanelLeftOpen } from "lucide-react"; import { useLayoutEffect, useRef, useState } from "react"; +import { MIN_MAIN_CONTENT_WIDTH_FOR_MOBILE } from "../App"; import { FileMenu } from "./FileMenu"; import { HelpMenu } from "./HelpMenu"; import { downloadModel } from "./rpc"; @@ -77,7 +78,7 @@ export function FileBar(properties: { {properties.isDrawerOpen ? : } - {width > 768 && ( + {width > MIN_MAIN_CONTENT_WIDTH_FOR_MOBILE && ( )} - {width > 768 && } + {width > MIN_MAIN_CONTENT_WIDTH_FOR_MOBILE && }