Merge remote-tracking branch 'origin/main' into dev

This commit is contained in:
ivic00
2024-11-12 21:42:19 +01:00
33 changed files with 4544 additions and 22626 deletions

View File

@ -164,16 +164,19 @@ export const AuthContextProvider: FC<{ children: ReactNode }> = ({children}) =>
}
}, [user, ready, redirectOverride]);
useEffect(() => {
const sub = Notifications.addNotificationReceivedListener(notification => {
const eventId = notification?.request?.content?.data?.eventId;
if (eventId) {
queryClient.invalidateQueries(['events']);
}
});
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;