clean fct when leaving a route - TanStack