Skip to content

Commit

Permalink
Minor update
Browse files Browse the repository at this point in the history
  • Loading branch information
kamranahmedse committed Apr 3, 2023
1 parent d21c1f6 commit caf1cd0
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions bin/update-sponsors.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@ function addPageSponsor({
imageUrl,
adTitle,
adDescription,
startDate,
endDate,
isActive,
}) {
const urlPart = pageUrl
.replace('https://roadmap.sh/', '')
Expand Down Expand Up @@ -128,6 +125,9 @@ function addPageSponsor({
removeAllSponsors('roadmaps');
removeAllSponsors('best-practices');

console.log('------------------------');
console.log('Adding sponsors');
console.log('------------------------');
fetch(sheetUrl)
.then((res) => res.json())
.then((rawData) => {
Expand All @@ -149,7 +149,8 @@ fetch(sheetUrl)

const isConfiguredActive = isActive?.toLowerCase() === 'yes';
const currentDate = new Date();
const isDateInRange = currentDate >= new Date(startDate) && currentDate <= new Date(endDate);
const isDateInRange =
currentDate >= new Date(startDate) && currentDate <= new Date(endDate);

if (!isConfiguredActive || !isDateInRange) {
return;
Expand Down

0 comments on commit caf1cd0

Please sign in to comment.