My goal is to return null for my Navigation component when my screen width is wide enough.
null
Navigation
if (!user.uid && pathname == "/" && !isTallEnough) return null; if (!user.uid && pathname === "/search" && !isTallEnough) return null;
Now, when I have a route for a username such as /alex or /ryan the conditional doesn't work:
/alex
/ryan
if (!user.uid && pathname === "/:id" && !isTallEnough) return null;
2.1m questions
2.1m answers
60 comments
57.0k users