diff --git a/app/components/settings/Settings.tsx b/app/components/settings/Settings.tsx index 874ebe1..23734f2 100644 --- a/app/components/settings/Settings.tsx +++ b/app/components/settings/Settings.tsx @@ -1,3 +1,4 @@ +//#region imports import React, { useState, useEffect } from 'react'; import { applyTheme } from './theme'; import { exportSettings, importSettings } from './settingUtils'; // Import utility functions @@ -34,6 +35,8 @@ const Settings: React.FC<{ closeSettings: () => void; accountName: string }> = ( return false; // Default to false if item is null or empty }; + //#region variables + // Active section const [activeSection, setActiveSection] = useState(() => localStorage.getItem('activeSection') || 'general'); @@ -287,6 +290,7 @@ const Settings: React.FC<{ closeSettings: () => void; accountName: string }> = ( { value: "'Zilla Slab Highlight', serif", label: 'Zilla Slab Highlight' }, ]; + //#region Start of the code const handleLogout = () => { localStorage.clear(); alert('Successfully logged out!'); @@ -379,10 +383,11 @@ const Settings: React.FC<{ closeSettings: () => void; accountName: string }> = ( } }; - + //#region rendered content // Render settings content based on the active section const renderSettingsContent = () => { switch (activeSection) { + //#region general case 'general': return (