1 import { deleteCookie, getCookie, setCookie } from '@proton/shared/lib/helpers/cookies';
3 export const sanitizeBetaSetting = (beta: boolean = false): boolean => {
4 const current = getCookie('Tag');
5 if (beta) return current === 'alpha' || current == 'beta';
6 return Boolean(current && current !== 'default');
9 export const setVersionTag = (beta: boolean = false, forceAlpha: boolean = false) => {
13 cookieValue: forceAlpha ? 'alpha' : 'beta',
14 expirationDate: 'max',
17 } else deleteCookie('Tag');