Fix impersonation: hard navigation + stop impersonating banner

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-25 13:12:47 +05:00
parent 808bcadfca
commit dd198349fb
3 changed files with 46 additions and 3 deletions
+2 -3
View File
@@ -100,9 +100,8 @@ function ImpersonateButton({ userId }: { userId: string }) {
setLoading(true);
try {
await authClient.admin.impersonateUser({ userId });
router.push("/dashboard");
router.refresh();
} finally {
window.location.href = "/dashboard";
} catch {
setLoading(false);
}
}