mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-05 22:57:40 +03:00
Merge pull request #56 from ibs0d/claude/remove-grid-spacing-E0vKX
Fix unused marginValue variable after removing grid spacing
This commit is contained in:
commit
78ee50a1ce
@ -8,7 +8,6 @@ import {
|
|||||||
import React, {
|
import React, {
|
||||||
useCallback,
|
useCallback,
|
||||||
useEffect,
|
useEffect,
|
||||||
useLayoutEffect,
|
|
||||||
useMemo,
|
useMemo,
|
||||||
useRef,
|
useRef,
|
||||||
useState,
|
useState,
|
||||||
@ -314,19 +313,6 @@ export default function DraggableGridLayout({
|
|||||||
isGridLayoutLoaded,
|
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 [containerWidth, setContainerWidth] = useState(0);
|
||||||
const [containerHeight, setContainerHeight] = useState(0);
|
const [containerHeight, setContainerHeight] = useState(0);
|
||||||
const roRef = useRef<ResizeObserver | null>(null);
|
const roRef = useRef<ResizeObserver | null>(null);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user