Logging out (and deleting the account) leads to the home page
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
@@ -16,7 +16,7 @@ export function AccountData() {
|
|||||||
setError(null);
|
setError(null);
|
||||||
try {
|
try {
|
||||||
await api("/me", { method: "DELETE", body: { confirm: "DELETE" } });
|
await api("/me", { method: "DELETE", body: { confirm: "DELETE" } });
|
||||||
window.location.href = "/belepes";
|
window.location.href = "/";
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
setError(errorText(e));
|
setError(errorText(e));
|
||||||
setBusy(false);
|
setBusy(false);
|
||||||
|
|||||||
@@ -13,10 +13,10 @@ export function LogoutButton() {
|
|||||||
try {
|
try {
|
||||||
await api("/auth/logout", { method: "POST" });
|
await api("/auth/logout", { method: "POST" });
|
||||||
} catch {
|
} catch {
|
||||||
// The session may already be gone; go to the login page either way.
|
// The session may already be gone; go to the home page either way.
|
||||||
}
|
}
|
||||||
window.google?.accounts.id.disableAutoSelect();
|
window.google?.accounts.id.disableAutoSelect();
|
||||||
router.replace("/belepes");
|
router.replace("/");
|
||||||
router.refresh();
|
router.refresh();
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user