nhl-schedule
Advanced tools
Comparing version 1.0.7 to 1.0.8
@@ -36,5 +36,5 @@ "use strict"; | ||
var startDate = new Date(); | ||
startDate.setHours(startDate.getHours() - (daysAgo !== null && daysAgo !== void 0 ? daysAgo : 3 * 24)); | ||
var endDate = new Date(); | ||
endDate.setHours(endDate.getHours() + (daysAhead !== null && daysAhead !== void 0 ? daysAhead : 7 * 24)); | ||
startDate.setHours(startDate.getHours() - (daysAgo ? daysAgo : 3 * 24)); | ||
endDate.setHours(endDate.getHours() + (daysAhead ? daysAhead : 7 * 24)); | ||
var fetchSchedule = /*#__PURE__*/function () { | ||
@@ -41,0 +41,0 @@ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() { |
{ | ||
"name": "nhl-schedule", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"description": "A widget that will show past and upcoming games in the NHL.", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
@@ -10,5 +10,5 @@ import { useEffect, useState } from "react"; | ||
const startDate = new Date(); | ||
startDate.setHours(startDate.getHours() - (daysAgo ?? 3 * 24)); | ||
const endDate = new Date(); | ||
endDate.setHours(endDate.getHours() + (daysAhead ?? 7 * 24)); | ||
startDate.setHours(startDate.getHours() - (daysAgo ? daysAgo : 3 * 24)); | ||
endDate.setHours(endDate.getHours() + (daysAhead ? daysAhead : 7 * 24)); | ||
const fetchSchedule = async () => { | ||
@@ -15,0 +15,0 @@ const response = await fetch( |
2262295