From bc6b7f8481a6a08e79c52002cb82715ea541fa02 Mon Sep 17 00:00:00 2001 From: sageTheDM Date: Fri, 11 Oct 2024 09:31:07 +0200 Subject: [PATCH] OpenSourceToggle comments --- app/components/settings/OpenSourceToggle.tsx | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/app/components/settings/OpenSourceToggle.tsx b/app/components/settings/OpenSourceToggle.tsx index 9e60415..3f9f4a1 100644 --- a/app/components/settings/OpenSourceToggle.tsx +++ b/app/components/settings/OpenSourceToggle.tsx @@ -12,25 +12,26 @@ const OpenSourceModeToggle: React.FC = ({ setOpenSourceMode, setSelectedOption }) => { + // Handle toggle change event const handleToggleChange = () => { - const newValue = !openSourceMode; - setOpenSourceMode(newValue); + const newValue = !openSourceMode; // Toggle the current state + setOpenSourceMode(newValue); // Update the open source mode state // Update radio selection based on the new openSourceMode value if (newValue) { setSelectedOption('FOSS'); // Set to FOSS if enabling open source mode } else { - setSelectedOption('None'); // Or any other default value when disabling + setSelectedOption('None'); // Set to a default value when disabling } }; return ( -
+
{/* Container for the toggle setting */}