Update state of route after submitting the form - TanStack