Commit 41ff9b3b authored by Ragnar-H's avatar Ragnar-H

Have storage alerts last for 30 days

Since users can hit a cap, 75% usage for example, the alert
needs to be refreshed periodically.
However we don't want to overfire these alerts either.
parent 3b74c341
......@@ -5,7 +5,7 @@ const handleOnDismiss = ({ currentTarget }) => {
dataset: { id, level },
} = currentTarget;
Cookies.set(`hide_storage_limit_alert_${id}_${level}`, true, { expires: 365 });
Cookies.set(`hide_storage_limit_alert_${id}_${level}`, true, { expires: 30 });
const notification = document.querySelector('.js-namespace-storage-alert');
notification.parentNode.removeChild(notification);
......
......@@ -30,7 +30,7 @@ describe('broadcast message on dismiss', () => {
dismiss();
expect(Cookies.set).toHaveBeenCalledWith('hide_storage_limit_alert_1_info', true, {
expires: 365,
expires: 30,
});
});
});
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment