11import Link from 'next/link' ;
2- import { useEffect , useState } from 'react' ;
3- import { hasCredentials } from '../../utils/auth' ;
42import Cart from './Cart.component' ;
53import AlgoliaSearchBox from '../AlgoliaSearch/AlgoliaSearchBox.component' ;
64import MobileSearch from '../AlgoliaSearch/MobileSearch.component' ;
@@ -10,12 +8,6 @@ import MobileSearch from '../AlgoliaSearch/MobileSearch.component';
108 * Includes mobile menu.
119 */
1210const Navbar = ( ) => {
13- const [ loggedIn , setLoggedIn ] = useState ( false ) ;
14-
15- useEffect ( ( ) => {
16- setLoggedIn ( hasCredentials ( ) ) ;
17- } , [ ] ) ;
18-
1911 return (
2012 < header className = "border-b border-gray-200" >
2113 < nav id = "header" className = "top-0 z-50 w-full bg-white" >
@@ -58,38 +50,6 @@ const Navbar = () => {
5850 </ Link >
5951 < div className = "flex items-center space-x-3" >
6052 < AlgoliaSearchBox />
61- { loggedIn ? (
62- < Link href = "/min-konto" >
63- < span className = "text-base uppercase tracking-wider group relative" >
64- < span className = "relative inline-block" >
65- < span className = "absolute -bottom-1 left-0 w-0 h-px bg-gray-900 group-hover:w-full transition-all duration-500" > </ span >
66- Min konto
67- </ span >
68- </ span >
69- </ Link >
70- ) : null }
71- { /* Temporarily hidden - Logg inn and Registrer links
72- ) : (
73- <>
74- <Link href="/logg-inn">
75- <span className="text-base uppercase tracking-wider group relative">
76- <span className="relative inline-block">
77- <span className="absolute -bottom-1 left-0 w-0 h-px bg-gray-900 group-hover:w-full transition-all duration-500"></span>
78- Logg inn
79- </span>
80- </span>
81- </Link>
82- <Link href="/registrer">
83- <span className="text-base uppercase tracking-wider group relative">
84- <span className="relative inline-block">
85- <span className="absolute -bottom-1 left-0 w-0 h-px bg-gray-900 group-hover:w-full transition-all duration-500"></span>
86- Registrer
87- </span>
88- </span>
89- </Link>
90- </>
91- )}
92- */ }
9353 < Cart />
9454 </ div >
9555 </ div >
0 commit comments