Split out `api.ts` into client vs server functions
Because we are doing useEffect in the api.ts, we have to use client to ensure all code runs on the client-side. There are functions that could (should?) run on the server side.
Describe the solution you'd like Split the api file into api_client/api_server, and use the server functions where appropriate
Describe alternatives you've considered I might be using it wrong.
This would require a rewrite of almost all of the api's that you want to be used in the server side. As almost all of them implement functionality that requires rendering on the client side (useSWR, useEffect, useRouter). I think that it would be most helpful to identify the api's that "need" to be rendered in the client side because we need to do more than just split the file.