Don't invalidate reminders when saving

This commit is contained in:
jude
2024-03-29 16:15:01 +00:00
parent d15a66d9d9
commit a770a17ee7
4 changed files with 15 additions and 17 deletions

View File

@ -12,7 +12,6 @@ export const EditButtonRow = () => {
const [reminder, setReminder] = useReminder();
const [recentlySaved, setRecentlySaved] = useState(false);
const queryClient = useQueryClient();
const iconFlashTimeout = useRef(0);
@ -26,16 +25,6 @@ export const EditButtonRow = () => {
});
},
onSuccess: (response) => {
if (guild) {
queryClient.invalidateQueries({
queryKey: ["GUILD_REMINDERS", guild],
});
} else {
queryClient.invalidateQueries({
queryKey: ["USER_REMINDERS"],
});
}
if (iconFlashTimeout.current !== null) {
clearTimeout(iconFlashTimeout.current);
}