How to type a response from Next.js NextResponse.json() using useQuery and Supabase
I'm using React Query to call a route handler in Next.js, I return a response from Supabase like so:
Now the problem comes when I try to access
data, I basically get data.data.data and that's where my array of objects is, how can I simplify this type/structure so I don't drill data 3 times?0 Replies