Settings aprroch 1 login overhaul
This commit is contained in:
parent
1876a3afd8
commit
727c5e540b
2 changed files with 25 additions and 12 deletions
|
@ -19,6 +19,12 @@ const Settings: React.FC<{ closeSettings: () => void; accountName: string }> = (
|
|||
return false; // Default to false if item is null or empty
|
||||
};
|
||||
|
||||
interface SettingsProps {
|
||||
closeSettings: () => void;
|
||||
accountName: string;
|
||||
handleLogout: () => void; // Add this line to accept handleLogout as a prop
|
||||
}
|
||||
|
||||
// Active section
|
||||
const [activeSection, setActiveSection] = useState(() => localStorage.getItem('activeSection') || 'general');
|
||||
|
||||
|
@ -842,8 +848,16 @@ const Settings: React.FC<{ closeSettings: () => void; accountName: string }> = (
|
|||
onChange={(e) => setNewPassword(e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
{/* Logout Button */}
|
||||
|
||||
<div className="settings-option">
|
||||
<button
|
||||
onClick={() => {
|
||||
closeSettings(); // Optionally close settings after logout
|
||||
}}
|
||||
className="logout-button"
|
||||
>
|
||||
Logout
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue