forked from React-Group/interstellar_ai
Merge branch 'main' into main
This commit is contained in:
commit
a2db31f663
13 changed files with 141 additions and 81 deletions
|
@ -299,9 +299,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();
|
||||
};
|
||||
|
@ -388,6 +386,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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue