Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
alan2207 committed Dec 7, 2024
1 parent b0fb641 commit 9a45c8b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions apps/react-vite/src/components/layouts/dashboard-layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,11 @@ const Progress = () => {
};

export function DashboardLayout({ children }: { children: React.ReactNode }) {
const logout = useLogout();
const { checkAccess } = useAuthorization();
const navigate = useNavigate();
const logout = useLogout({
onSuccess: () => navigate(paths.auth.login.getHref(location.pathname)),
});
const { checkAccess } = useAuthorization();
const navigation = [
{ name: 'Dashboard', to: paths.app.dashboard.getHref(), icon: Home },
{ name: 'Discussions', to: paths.app.discussions.getHref(), icon: Folder },
Expand Down

0 comments on commit 9a45c8b

Please sign in to comment.