aboutsummaryrefslogtreecommitdiffhomepage
path: root/frontend/src/components/Navigation.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/components/Navigation.tsx')
-rw-r--r--frontend/src/components/Navigation.tsx6
1 files changed, 4 insertions, 2 deletions
diff --git a/frontend/src/components/Navigation.tsx b/frontend/src/components/Navigation.tsx
index 1f99cd6..3029e1d 100644
--- a/frontend/src/components/Navigation.tsx
+++ b/frontend/src/components/Navigation.tsx
@@ -5,12 +5,14 @@ import {
faRightFromBracket,
} from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
+import { useAtomValue, useSetAtom } from "jotai";
import { Link } from "wouter";
-import { useAuth } from "../contexts/AuthContext";
+import { isLoggedInAtom, logoutAtom } from "../atoms";
import { MenuItem } from "./MenuItem";
export function Navigation() {
- const { logout, isLoggedIn } = useAuth();
+ const isLoggedIn = useAtomValue(isLoggedInAtom);
+ const logout = useSetAtom(logoutAtom);
const handleLogout = async () => {
await logout();