mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-11-08 04:55:06 +09:00
refresh assets after deletion
This commit is contained in:
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) => {
|
||||
|
||||
Reference in new issue
Block a user