Cron-Implementation: Tested!

This commit is contained in:
Zain 2021-11-16 18:29:31 +05:30
parent 412f9ed431
commit 25a1505fd0
No known key found for this signature in database
GPG key ID: 84AD8F072D45C37F

View file

@ -47,10 +47,9 @@ class App extends React.Component<any,any> {
} }
CheckCron(lastCron: string) { CheckCron(lastCron: string) {
let cronDate = new Date(lastCron).getDate(); let cronDate = new Date(lastCron);
let now = new Date().getDate(); let now = new Date();
console.log(cronDate, now); if (cronDate.getDate() != now.getDate() || (cronDate.getMonth() != now.getMonth() || cronDate.getFullYear() != now.getFullYear())) {
if (cronDate != now) {
return( return(
<div className="cron"> <div className="cron">
<div id="cronMessage"> Welcome back! Please check your tasks for the last day and hit continue to get your daily rewards. </div> <div id="cronMessage"> Welcome back! Please check your tasks for the last day and hit continue to get your daily rewards. </div>