Skip to content

Commit

Permalink
Fix sw notification click action (ohcnetwork#6127)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashesh3 authored Aug 21, 2023
1 parent 8850c02 commit daf3e01
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/Components/Notifications/ShowPushNotification.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useDispatch } from "react-redux";
import { getNotificationData } from "../../Redux/actions";
import { useEffect } from "react";

export default function ShowPushNotification({ external_id }: any) {
const dispatch: any = useDispatch();
Expand Down Expand Up @@ -30,11 +31,13 @@ export default function ShowPushNotification({ external_id }: any) {
}
};

resultUrl()
.then((url) => {
window.location.href = url;
})
.catch((err) => console.log(err));
useEffect(() => {
resultUrl()
.then((url) => {
window.location.href = url;
})
.catch((err) => console.log(err));
}, []);

return <></>;
}

0 comments on commit daf3e01

Please sign in to comment.