diff --git a/components/Layout/Navigation.js b/components/Layout/Navigation.js index 9e69a16db..8a3f12e53 100755 --- a/components/Layout/Navigation.js +++ b/components/Layout/Navigation.js @@ -26,8 +26,11 @@ const Navigation = () => { useEffect(() => { const getNotificationCookie = async () => { - const signedKnockTokenCookie = await window?.cookieStore?.get('signed_knock_token'); - setNotificationToken(signedKnockTokenCookie?.value); + // regex for signed_knock_token cookie + const signedKnockTokenCookie = document.cookie.match(/(signed_knock_token=)(.*?)+/)[0].slice(19); + + console.log(signedKnockTokenCookie); + setNotificationToken(signedKnockTokenCookie); }; getNotificationCookie(); diff --git a/components/Notifications/NotificationBell.js b/components/Notifications/NotificationBell.js index 219956836..da7fb7a0f 100644 --- a/components/Notifications/NotificationBell.js +++ b/components/Notifications/NotificationBell.js @@ -15,6 +15,7 @@ const NotificationBell = ({ userId, notificationToken }) => { return ( { setIsVisible(!isVisible)} /> notificationClicked(item)} onClose={() => setIsVisible(false)}