finntechnologies / sinnples

Sinnples, the app for your home reform service indication
https://app.sinnples.com
16 stars 3 forks source link

Feat: Modal Delete component #31

Closed Thiago-Mota-Santos closed 1 year ago

Thiago-Mota-Santos commented 1 year ago

Motivation:

Mutate from SWR, to provide fast feedback to client;

As 'delete' in the api takes the id and puts it in the url, nextjs will look in a file that supports dynamic route, in our case '[id].ts' and in that file the handler function did not have a DELETE method implemented, this just called the GET method from there.

https://github.com/finntechnologies/sinnples/issues/10#issuecomment-1687165285

image