79261270

Date: 2024-12-07 19:44:01
Score: 1.5
Natty:
Report link

I'd suggest that you make a server action for the api call. That way you just have to update the useEffect to call the server action instead of the direct fetch. Do not pass any auth or session data from the client to the server action directly, instead get fresh session auth/data on each request (server action call). And do not forget to validate the input before running the client input on the server, using a middleware is a very good solution in most cases.

Reasons:
  • No code block (0.5):
  • Low reputation (1):
Posted by: rizzling