mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-26 21:58:45 +00:00
fix: invalidate notification.one query cache on update
When editing a notification, only the notification.all query cache was invalidated. The notification.one query retained stale data, causing the edit form to display previous values on subsequent edits.
This commit is contained in:
@@ -737,6 +737,9 @@ export const HandleNotifications = ({ notificationId }: Props) => {
|
|||||||
});
|
});
|
||||||
setVisible(false);
|
setVisible(false);
|
||||||
await utils.notification.all.invalidate();
|
await utils.notification.all.invalidate();
|
||||||
|
if (notificationId) {
|
||||||
|
await utils.notification.one.invalidate({ notificationId });
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error(
|
toast.error(
|
||||||
|
|||||||
Reference in New Issue
Block a user