korayaggul
korayaggul
NNovu
Created by korayaggul on 2/28/2024 in #💬│support
How to use onesignal push notification for novu ?
No description
13 replies
NNovu
Created by korayaggul on 2/22/2024 in #💬│support
Socket Questions
Where can I get the unseencount information and how can I remove the message I saw from the unseencount? It only appears here when there is a change. When the page is opened, it appears blank.
useEffect(()=>{
if (socket) {
socket.on("unseen_count_changed", (data) => {
console.log("zxcdata22",data)
})
}
},[socket])
useEffect(()=>{
if (socket) {
socket.on("unseen_count_changed", (data) => {
console.log("zxcdata22",data)
})
}
},[socket])
I'm pulling the data here and showing it, but I want to mark it as read when I click the button, how can I do that?
useEffect(() => {
if (socket) {
socket.on("notification_received", (data) => {
setNotificationContent(data.message.content);
setNotificationContentCreator(data.message.payload.data.creatorName);
setNotificationContentUrl(data.message.payload.data.url);
setOpenNotification(true);
});

}
return () => {
// if (socket) {
// socket.off("notification_received");
// }
};
}, [socket]);
<Link
to={notificationContentUrl}
style={{
position: "absolute",
zIndex: 999,
right: 10,
textDecoration:'none'
}}
>
<Notification icon={checkIcon} withCloseButton={false} color="teal" title="All good!" mt="md">
{notificationContent + " " + notificationContentCreator}
</Notification>
</Link>
useEffect(() => {
if (socket) {
socket.on("notification_received", (data) => {
setNotificationContent(data.message.content);
setNotificationContentCreator(data.message.payload.data.creatorName);
setNotificationContentUrl(data.message.payload.data.url);
setOpenNotification(true);
});

}
return () => {
// if (socket) {
// socket.off("notification_received");
// }
};
}, [socket]);
<Link
to={notificationContentUrl}
style={{
position: "absolute",
zIndex: 999,
right: 10,
textDecoration:'none'
}}
>
<Notification icon={checkIcon} withCloseButton={false} color="teal" title="All good!" mt="md">
{notificationContent + " " + notificationContentCreator}
</Notification>
</Link>
7 replies
NNovu
Created by korayaggul on 2/21/2024 in #💬│support
API Cors Error
No description
20 replies