cleanup loading states

This commit is contained in:
Max Peintner
2024-11-11 10:45:32 +01:00
parent 771befced7
commit 7cbdb09939
16 changed files with 186 additions and 147 deletions

View File

@@ -40,11 +40,14 @@ export function SessionItem({
setLoading(true);
const response = await cleanupSession({
sessionId: id,
}).catch((error) => {
setError(error.message);
});
})
.catch((error) => {
setError(error.message);
})
.finally(() => {
setLoading(false);
});
setLoading(false);
return response;
}