How to treat the data before passing the data? - TanStack