summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/broadcast_notification.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/broadcast_notification.js')
-rw-r--r--app/assets/javascripts/broadcast_notification.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/assets/javascripts/broadcast_notification.js b/app/assets/javascripts/broadcast_notification.js
index dc5401199dc..97da6fa34da 100644
--- a/app/assets/javascripts/broadcast_notification.js
+++ b/app/assets/javascripts/broadcast_notification.js
@@ -3,10 +3,10 @@ import Cookies from 'js-cookie';
const handleOnDismiss = ({ currentTarget }) => {
currentTarget.removeEventListener('click', handleOnDismiss);
const {
- dataset: { id },
+ dataset: { id, expireDate },
} = currentTarget;
- Cookies.set(`hide_broadcast_message_${id}`, true);
+ Cookies.set(`hide_broadcast_message_${id}`, true, { expires: new Date(expireDate) });
const notification = document.querySelector(`.js-broadcast-notification-${id}`);
notification.parentNode.removeChild(notification);