Fix: Handle json correctly on delete response recieved

This commit is contained in:
sayanm16
2024-10-21 16:24:41 +05:30
parent 2c25f4a4c0
commit b442cc186a

View File

@@ -42,7 +42,8 @@ export default function APIKeys() {
return response.json();
})
.then((data) => {
data.status === 'ok' &&
console.log(data);
data.success === true &&
setApiKeys((previous) => previous.filter((elem) => elem.id !== id));
})
.catch((error) => {