fix: fix order in resource dialog (#733)

This commit is contained in:
Zeng1998 2022-12-11 21:36:17 +08:00 committed by GitHub
parent 91220ea4a6
commit c4278ef55a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,7 +34,7 @@ const resourceService = {
const { data } = (await api.uploadFile(formData)).data;
const resource = convertResponseModelResource(data);
const resourceList = resourceService.getState().resources;
store.dispatch(setResources(resourceList.concat(resource)));
store.dispatch(setResources([resource, ...resourceList]));
return resource;
},