[x] - Updated Dialog modal and delete modal with mutate from the SWR
[x] - Refactored Handler functions into api
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.
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