Mute socket messages in production, fix max-len, update dependencies

This commit is contained in:
Maksim Eltyshev
2019-09-25 02:26:31 +05:00
parent 7bd12cd8b8
commit 6eb431f721
26 changed files with 1157 additions and 1192 deletions

View File

@@ -1,5 +1,10 @@
// eslint-disable-next-line max-len
const getFullSeconds = ({ startedAt, total }) => (startedAt ? Math.floor((new Date() - startedAt) / 1000) + total : total);
const getFullSeconds = ({ startedAt, total }) => {
if (startedAt) {
return Math.floor((new Date() - startedAt) / 1000) + total;
}
return total;
};
export const createTimer = ({ hours, minutes, seconds }) => ({
startedAt: null,