main #40

Merged
YasinOnm08 merged 10 commits from React-Group/interstellar_ai:main into main 2024-10-02 09:38:37 +02:00
Showing only changes of commit e8aef99512 - Show all commits

View file

@ -278,9 +278,7 @@ const Settings: React.FC<{ closeSettings: () => void; accountName: string }> = (
const handleLogout = () => {
setIsLoggedIn(false);
localStorage.removeItem('accountName');
localStorage.removeItem('accountEmail');
localStorage.removeItem('accountPassword');
localStorage.clear();
alert('Successfully logged out!');
window.location.reload();
};
@ -367,6 +365,7 @@ const Settings: React.FC<{ closeSettings: () => void; accountName: string }> = (
if (useName && usePassword) {
const success = await deleteAccount(useName, usePassword);
if (success) {
localStorage.clear();
alert('Account deleted successfully!');
window.location.reload()
// Optionally, redirect or reset state here