changing cookie lifetime to 30 days
This commit is contained in:
parent
22250aeb26
commit
1d6a6e192b
|
|
@ -11,8 +11,8 @@ export default function NotificationsInit() {
|
|||
|
||||
notificationClose.addEventListener('click', () => {
|
||||
notification.classList.add('notification--dismissed');
|
||||
document.cookie = `${notificationId}=dismissed; path=/; max-age=30`;
|
||||
// document.cookie = `${notificationId}=dismissed; path=/; max-age=${30 * 86400}`; // 86400 = 1 day
|
||||
const thirtyDays = 30 * 86400;
|
||||
document.cookie = `${notificationId}=dismissed; path=/; max-age=${thirtyDays}`;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user