Proper way to handle a protected route with react-query - Theo's Typesafe Cult