refresh assets after deletion

This commit is contained in:
Oleg Isonen committed 2022-12-12 21:13:37 +00:00
1 parent af90b31945
commit 9dfcdad0db
1 file changed
+6 -1
@@ -123,11 +123,16 @@ export const useAssets = (type: AssetType) => {
}, [data, setAssets]);
const handleDelete = (ids: Array<string>) => {
if (action === undefined) {
return;
}
const formData = new FormData();
for (const id of ids) {
formData.append("assetId", id);
}
submit(formData, { method: "delete", action });
submit(formData, { method: "delete", action }, () => {
load(action);
});
};
const handleSubmit = (input: HTMLInputElement) => {