Menu
const idleDetector = new IdleDetector();
idleDetector.addEventListener('change', () => {
const { screenState } = idleDetector;
// redirect to promo screen when screen is locked
if (screenState === 'locked') {
location.href = '/demo/cds-rice-promo';
}
});