Fixed accidental call on useContext after an early return

master
TZGyn 2 years ago
parent 6eec4e0c38
commit 74c16a3b46
Signed by: TZGyn
GPG Key ID: 122EAF77AE81FD4A

@ -42,13 +42,12 @@ export const Navbar = ({
categories: BookmarkCategory[]
}) => {
const pathname = usePathname()
const { setSelectedCategory } = useContext(BookmarkCategoryContext)
if (pathname.startsWith('/login') || pathname.startsWith('/signup')) {
return <></>
}
const { setSelectedCategory } = useContext(BookmarkCategoryContext)
return (
<NextUINavbar
maxWidth='xl'

Loading…
Cancel
Save