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