Fix impersonation: hard navigation + stop impersonating banner
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user