Merge pull request #56 from ibs0d/claude/remove-grid-spacing-E0vKX

Fix unused marginValue variable after removing grid spacing
This commit is contained in:
ibs0d 2026-03-16 18:47:39 +11:00 committed by GitHub
commit 78ee50a1ce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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<ResizeObserver | null>(null);