How to detect page navigation and i.e. close mobile menu? - TanStack