From 08c5e8978ab426373d9b0788e3d133fc989070ac Mon Sep 17 00:00:00 2001 From: SethBurkart123 Date: Mon, 26 Feb 2024 18:28:50 +1100 Subject: [PATCH] chore: remove unused code --- src/interface/components/Picker.tsx | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/interface/components/Picker.tsx b/src/interface/components/Picker.tsx index 50ad7838..24c18752 100644 --- a/src/interface/components/Picker.tsx +++ b/src/interface/components/Picker.tsx @@ -48,7 +48,6 @@ function Picker() { return () => { window.removeEventListener("message", handleMessage); }; - // eslint-disable-next-line react-hooks/exhaustive-deps }, []); useEffect(() => { @@ -56,7 +55,7 @@ function Picker() { if (!showPicker) { // Check if the selected color is already in the presets const existingIndex = presets.indexOf(settingsState.customThemeColor); - + let updatedPresets; if (existingIndex > -1) { // If the color exists, move it to the front @@ -69,7 +68,7 @@ function Picker() { // If the color is new, add it to the front and slice the array updatedPresets = [settingsState.customThemeColor, ...presets].slice(0, 18); } - + setPresets(updatedPresets); localStorage.setItem('colorPickerPresets', JSON.stringify(updatedPresets)); } @@ -98,7 +97,7 @@ function Picker() { return ( // Apply fade-in animation to background -
{/* Apply springy scale animation */} - e.stopPropagation()} + onClick={(e) => e.stopPropagation()} className="h-auto p-4 bg-white border rounded-lg shadow-lg dark:bg-zinc-800 border-zinc-100 dark:border-zinc-700" > @@ -125,4 +124,4 @@ function Picker() { ); } -export default memo(Picker); \ No newline at end of file +export default memo(Picker);