diff --git a/src/components/Login/account-nav.tsx b/src/components/Login/account-nav.tsx index a35798911..b1841e7b0 100644 --- a/src/components/Login/account-nav.tsx +++ b/src/components/Login/account-nav.tsx @@ -1,26 +1,13 @@ -import Cookies from 'js-cookie'; -import { useEffect, useState } from 'preact/hooks'; -import { TOKEN_COOKIE_NAME } from '../../lib/utils'; import { useAuth } from '../../hooks/use-auth'; export default function AccountNavigation() { - const [isAuthenticated, setIsAuthenticated] = useState(false); - const { user, status } = useAuth(); + const { user, isLoading } = useAuth(); - useEffect(() => { - const token = Cookies.get(TOKEN_COOKIE_NAME); - if (token) { - setIsAuthenticated(true); - } else { - setIsAuthenticated(false); - } - }, []); - - console.log('user', user, status); + console.log('user', user, isLoading); return (