fix: resolve HashRouter reload issues during impersonation handoffs
All checks were successful
Build and Deploy / build-and-push (push) Successful in 1m2s

- Updated Layout and SuperAdmin to explicitly set window.location.hash before triggering window.location.reload() to guarantee correct routing after state resets.
This commit is contained in:
Cauê Faleiros
2026-03-11 14:54:35 -03:00
parent 89f250a43b
commit 684b98bd0e
2 changed files with 4 additions and 2 deletions

View File

@@ -101,7 +101,8 @@ export const SuperAdmin: React.FC = () => {
}
await impersonateTenant(tenantId);
// Force a full reload to clear any cached context/state in the React app
window.location.href = '/';
window.location.hash = '#/';
window.location.reload();
} catch (err: any) {
alert(err.message || 'Erro ao tentar entrar na organização.');
}