In NextJS you should fetch data in a server component then pass the data to client component, this is needed to reduce JavaScript on the client and improve performance, this is the whole idea of using NextJS, fetch data on server component and then send it to client component, a component that needs interactivity such as onClick
or hooks
needs to be a client component