Fixed offers list not updating when adding offer (#19075)

no issue

- fixes an issue where the offers list doesn't get updated when a new
offer is added to the list.
This commit is contained in:
Ronald Langeveld 2023-11-21 18:27:52 +07:00 committed by GitHub
parent 2f07af05cb
commit 3a68d78217
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,5 @@
import {Meta, createMutation, createQuery, createQueryWithId} from '../utils/api/hooks';
import {updateQueryCache} from '../utils/api/updateQueries';
import {updateQueryCache, insertToQueryCache} from '../utils/api/updateQueries';
export type Offer = {
id: string;
@ -71,6 +71,6 @@ export const useAddOffer = createMutation<OfferAddResponseType, NewOffer>({
updateQueries: {
dataType,
emberUpdateType: 'createOrUpdate',
update: updateQueryCache('offers')
update: insertToQueryCache('offers')
}
});