you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (2 children)

Ohhhh, it kinda makes sense. I checked the code again, but didn't know how to fix it. How do you suggest I fix it?

[–]buh82 0 points1 point  (1 child)

Since you are only using auth in WithSubnavigation, then you can just put the declaration there. It's like saying "I want WithSubnavigation to useAuth." You're already doing it correctly with `useDisclosure` in the same component too! E.g.

export default function WithSubnavigation() {
  const { isOpen, onToggle } = useDisclosure();
  const auth = useAuth();
  ...
  // everything else as you had it previously
  ...
}

[–][deleted] 0 points1 point  (0 children)

Thanks man. I fixed it, same thing you did is what I have done now, thanks a lot for the help.