mirror of
https://github.com/urosran/cally.git
synced 2025-11-26 00:24:53 +00:00
sync update
This commit is contained in:
@ -165,14 +165,17 @@ export const AuthContextProvider: FC<{ children: ReactNode }> = ({children}) =>
|
||||
}, [user, ready, redirectOverride]);
|
||||
|
||||
useEffect(() => {
|
||||
const sub = Notifications.addNotificationReceivedListener(notification => {
|
||||
const handleNotification = async (notification: Notifications.Notification) => {
|
||||
const eventId = notification?.request?.content?.data?.eventId;
|
||||
|
||||
if (eventId) {
|
||||
queryClient.invalidateQueries(['events']);
|
||||
}
|
||||
});
|
||||
return () => sub.remove()
|
||||
// if (eventId) {
|
||||
queryClient.invalidateQueries(['events']);
|
||||
// }
|
||||
};
|
||||
|
||||
const sub = Notifications.addNotificationReceivedListener(handleNotification);
|
||||
|
||||
return () => sub.remove();
|
||||
}, []);
|
||||
|
||||
if (!ready) {
|
||||
|
||||
Reference in New Issue
Block a user