This commit is contained in:
2025-11-17 00:43:43 +01:00
parent 5ffbcc47e3
commit c56058b939
2 changed files with 121 additions and 43 deletions
+2 -6
View File
@@ -37,16 +37,12 @@ const AppLayout: React.FC = () => {
});
if (['logged-out', 'authenticating', 'selecting-tenant'].includes(appStatus)) {
const shouldRememberLastLocation = appStatus !== 'logged-out';
const redirectTarget = `${location.pathname}${location.search}${location.hash || ''}`;
return (
<Navigate
to="/account/login"
replace
state={
shouldRememberLastLocation
? { from: location.pathname + location.search }
: undefined
}
state={{ from: redirectTarget }}
/>
);
}