Skip to content
This repository was archived by the owner on Feb 22, 2024. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/indexPage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,18 @@ import BinaryLanding from './react-components/binary-landing';
const today = new Date().getTime();
// eslint-disable-next-line one-var
const oneMilliSec = 1000;
const sevenDays = 7;
const oneMinute = 60;
const oneDay = 24;
// will uncomment before production release
// const sevenDays = 7;
// const oneMinute = 60;
// const oneDay = 24;

export const elements = ['#notification-banner', '#main', '#footer', '#header', '#topbar'];
// eslint-disable-next-line one-var
export const bannerToken = getStorage('setDueDateForBanner');

// eslint-disable-next-line arrow-body-style
export const expirationDate = () => {
return today + oneMilliSec * oneMinute * oneMinute * oneDay * sevenDays;
return today + oneMilliSec * 600;
};

export const calcSetTimeoutValueBanner = expirationDate() - new Date().getTime();
Expand Down Expand Up @@ -74,7 +75,6 @@ const renderBanner = () => {
Component = <BotLanding />;
dynamicVar = 'bot-landing';
}
console.log(Component, dynamicVar);
render(Component, document.getElementById(dynamicVar));
// setStorage('setDueDateForBanner', expirationDate());
elements.map(elem => document.querySelector(elem).classList.add('hidden'));
Expand Down