Skip to content

Commit 8460348

Browse files
committed
fix: make navbar end session use endSession onClick method
1 parent 8937439 commit 8460348

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

apps/web/src/components/Navbar/Navbar.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export const Navbar = () => {
1818
const navItems = useNavItems();
1919
const { t } = useTranslation('layout');
2020
const navigate = useNavigate();
21+
const endSession = useAppStore((store) => store.endSession);
2122

2223
// This is to prevent ugly styling when resizing the viewport
2324
const isDesktop = useIsDesktop();
@@ -83,6 +84,10 @@ export const Navbar = () => {
8384
isActive={false}
8485
label={t('navLinks.endSession')}
8586
url="#"
87+
onClick={() => {
88+
endSession();
89+
void navigate({ to: '/session/start-session' });
90+
}}
8691
/>
8792
)}
8893
</div>

0 commit comments

Comments
 (0)