Obtain the pathname of a route outside of React? - TanStack