How should I type 'prev' search in reusable component? If it is going to be always the same type - TanStack