New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Live view to js #616
Live view to js #616
Conversation
const diffMinutes = Math.floor((diffInMiliseconds/1000/60)); | ||
const diffSeconds = Math.floor(((diffInMiliseconds/1000/60 - diffMinutes)*60)); | ||
|
||
p.innerHTML = `Will start in ${diffMinutes} minutes ${diffSeconds} seconds`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have some doubts about inner html.. I don't know..is it right way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, let's follow this comment https://github.com/hexlet-codebattle/codebattle/pull/616/files#r371474316
p.innerHTML = 'the tournament has begun'; | ||
clearInterval(intervalId); | ||
}; | ||
}, 1000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Што-то как-то труднее стало)) Как насчет вынести в реакт компонент и повесить его на p#timer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
вот вопрос с inner html и отпал) спасибо)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
да, надо просто реакт компенент сделать. можно либку использовать, или самому data-attr заюзать
sorry, man |
No description provided.