Setting Router Context with result of react hook - TanStack