Skip to content

Commit 749679c

Browse files
committed
reverts cookie
1 parent ab2623c commit 749679c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

components/Layout/Navigation.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,8 @@ const Navigation = () => {
2626

2727
useEffect(() => {
2828
const getNotificationCookie = async () => {
29-
// regex for signed_knock_token cookie
30-
const signedKnockTokenCookie = document.cookie.match(/(signed_knock_token=)(.*?)+/)[0].slice(19);
31-
32-
setNotificationToken(signedKnockTokenCookie);
29+
const signedKnockTokenCookie = await window?.cookieStore?.get('signed_knock_token');
30+
setNotificationToken(signedKnockTokenCookie?.value);
3331
};
3432

3533
getNotificationCookie();

0 commit comments

Comments
 (0)