mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 05:37:34 +03:00
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:
parent
2f07af05cb
commit
3a68d78217
@ -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')
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user