We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ab2623c commit 749679cCopy full SHA for 749679c
components/Layout/Navigation.js
@@ -26,10 +26,8 @@ const Navigation = () => {
26
27
useEffect(() => {
28
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);
+ const signedKnockTokenCookie = await window?.cookieStore?.get('signed_knock_token');
+ setNotificationToken(signedKnockTokenCookie?.value);
33
};
34
35
getNotificationCookie();
0 commit comments