File tree 1 file changed +4
-1
lines changed
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 1
- import { Link } from "@remix-run/react" ;
1
+ import { Link , useNavigate } from "@remix-run/react" ;
2
2
import { LogOut , Tickets , UserIcon , VenetianMaskIcon } from "lucide-react" ;
3
3
import { useMemo , useState } from "react" ;
4
4
@@ -18,6 +18,7 @@ import { ThemeSwitcher } from "./ThemeSwitcher";
18
18
import type { NavbarMenuItem } from "./types" ;
19
19
20
20
export const Navbar = ( ) => {
21
+ const navigate = useNavigate ( ) ;
21
22
const isLogged = useIsLoggedIn ( ) ;
22
23
const isAuthReady = useIsAuthReady ( ) ;
23
24
const myProfile = useMyProfileQuery ( {
@@ -87,6 +88,7 @@ export const Navbar = () => {
87
88
icon : < LogOut className = "mr-2 size-4" /> ,
88
89
onClick : ( ) => {
89
90
logout ( ) . catch ( console . error ) ;
91
+ navigate ( urls . home ) ;
90
92
} ,
91
93
} ,
92
94
] ,
@@ -104,6 +106,7 @@ export const Navbar = () => {
104
106
isLogged ,
105
107
myProfile ?. data ?. me ?. isSuperAdmin ,
106
108
setImpersonation ,
109
+ navigate
107
110
] ,
108
111
) ;
109
112
You can’t perform that action at this time.
0 commit comments