refactor: redirect to root path instead of login page on logout in Backoffice and Portal layouts

This commit is contained in:
estifanos
2026-08-17 07:04:45 +00:00
parent 31934f5933
commit 4a33347853
2 changed files with 2 additions and 2 deletions

View File

@@ -87,7 +87,7 @@ export function BackofficeLayout() {
const handleLogout = useCallback(() => {
dispatch(logout());
dispatch(baseApi.util.resetApiState());
navigate("/login");
navigate("/");
}, [dispatch, navigate]);
const segments = location.pathname.split('/').filter(Boolean);

View File

@@ -186,7 +186,7 @@ export function PortalLayout() {
const handleLogout = () => {
dispatch(logout());
dispatch(baseApi.util.resetApiState());
navigate("/login");
navigate("/");
};
const displayName = user?.name?.en || user?.username || "";