@timardex/cluemart-shared 1.5.586 → 1.5.587
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-YGKLLYKV.mjs → chunk-P52HS2NB.mjs} +15 -2
- package/dist/chunk-P52HS2NB.mjs.map +1 -0
- package/dist/graphql/index.cjs +14 -1
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +9 -1
- package/dist/graphql/index.d.ts +9 -1
- package/dist/graphql/index.mjs +1 -1
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.mjs +1 -1
- package/dist/index.cjs +14 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +9 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.mjs +14 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-YGKLLYKV.mjs.map +0 -1
package/dist/hooks/index.mjs
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -4247,7 +4247,20 @@ var useCreateEvent = () => {
|
|
|
4247
4247
|
var useUpdateEvent = () => {
|
|
4248
4248
|
const [updateEvent, { loading, error }] = (0, import_client18.useMutation)(UPDATE_EVENT_MUTATION, {
|
|
4249
4249
|
awaitRefetchQueries: true,
|
|
4250
|
-
refetchQueries:
|
|
4250
|
+
refetchQueries: (mutationResult) => {
|
|
4251
|
+
const eventId = mutationResult?.data?.updateEvent?._id;
|
|
4252
|
+
if (!eventId) return [];
|
|
4253
|
+
return [
|
|
4254
|
+
{
|
|
4255
|
+
query: GET_USER_EVENTS
|
|
4256
|
+
},
|
|
4257
|
+
{
|
|
4258
|
+
query: GET_EVENT,
|
|
4259
|
+
variables: { _id: eventId }
|
|
4260
|
+
// Pass the eventId for refetching
|
|
4261
|
+
}
|
|
4262
|
+
];
|
|
4263
|
+
}
|
|
4251
4264
|
});
|
|
4252
4265
|
return { error, loading, updateEvent };
|
|
4253
4266
|
};
|