From facd80ce72c305a4352c15f916b9bc5d3d2f497b Mon Sep 17 00:00:00 2001 From: Sean Edmunds Date: Thu, 10 Jul 2025 14:59:56 -0500 Subject: [PATCH] Background name label fix --- .../settings/components/Theming/BackgroundModal.tsx | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/pages/settings/components/Theming/BackgroundModal.tsx b/src/pages/settings/components/Theming/BackgroundModal.tsx index fcc66da..859ee1d 100644 --- a/src/pages/settings/components/Theming/BackgroundModal.tsx +++ b/src/pages/settings/components/Theming/BackgroundModal.tsx @@ -39,7 +39,6 @@ function BackgroundModal({ inUseBackgrounds: string[]; }) { const { ref, width } = useElementSize(); - const [backgroundWidth, setBackgroundWidth] = useState(width || 0); const [background, setBackground] = useState(null); const [fileName, setFileName] = useState(''); const [newFileName, setNewFileName] = useState(''); @@ -63,11 +62,7 @@ function BackgroundModal({ setIsLoading(false); } }, [debouncedSearch]); - useEffect(() => { - if (width) { - setBackgroundWidth(width); - } - }, [width]); + return ( @@ -206,7 +202,7 @@ function BackgroundModal({ textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap', - maxWidth: backgroundWidth, + maxWidth: width, }} > {background} @@ -251,7 +247,7 @@ function BackgroundModal({ setConfirm(true); }} > - + ))}