From b22dc4c94602061197a262e74f4ee30238ef0a85 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 16 Mar 2026 07:36:46 +0000 Subject: [PATCH] Fix unused marginValue variable after removing grid spacing Removed marginValue state and useLayoutEffect that calculated font size, and removed unused useLayoutEffect import. https://claude.ai/code/session_01THf2SuS7hLt9NgstxvKdg8 --- web/src/views/live/DraggableGridLayout.tsx | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/web/src/views/live/DraggableGridLayout.tsx b/web/src/views/live/DraggableGridLayout.tsx index 613b9c5b2..55682b92c 100644 --- a/web/src/views/live/DraggableGridLayout.tsx +++ b/web/src/views/live/DraggableGridLayout.tsx @@ -8,7 +8,6 @@ import { import React, { useCallback, useEffect, - useLayoutEffect, useMemo, useRef, useState, @@ -314,19 +313,6 @@ export default function DraggableGridLayout({ isGridLayoutLoaded, ]); - const [marginValue, setMarginValue] = useState(16); - - // calculate margin value for browsers that don't have default font size of 16px - useLayoutEffect(() => { - const calculateRemValue = () => { - const htmlElement = document.documentElement; - const fontSize = window.getComputedStyle(htmlElement).fontSize; - setMarginValue(parseFloat(fontSize)); - }; - - calculateRemValue(); - }, []); - const [containerWidth, setContainerWidth] = useState(0); const [containerHeight, setContainerHeight] = useState(0); const roRef = useRef(null);