@daryasidorovich/modsen-datepicker 1.0.21 → 1.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +3 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -547,8 +547,8 @@ function withMinMax(calendar, minDate, maxDate) {
|
|
|
547
547
|
return calendar;
|
|
548
548
|
}
|
|
549
549
|
|
|
550
|
-
const HOLIDAY_API_URL =
|
|
551
|
-
const API_KEY =
|
|
550
|
+
const HOLIDAY_API_URL = 'https://holidayapi.com/v1';
|
|
551
|
+
const API_KEY = 'f36f54be-e335-4957-9c64-fde814074428';
|
|
552
552
|
const getHolidays = async (year = new Date().getFullYear(), signal) => {
|
|
553
553
|
try {
|
|
554
554
|
let holidayDates;
|
|
@@ -557,9 +557,7 @@ const getHolidays = async (year = new Date().getFullYear(), signal) => {
|
|
|
557
557
|
if (!countryCode) {
|
|
558
558
|
throw new Error('Cannot get your country code');
|
|
559
559
|
}
|
|
560
|
-
if (!API_KEY)
|
|
561
|
-
throw new Error('API key is not defined');
|
|
562
|
-
}
|
|
560
|
+
if (!API_KEY) ;
|
|
563
561
|
const url = `${HOLIDAY_API_URL}?key=${API_KEY}&country=${countryCode}&year=${year}`;
|
|
564
562
|
const response = await fetch(url, { signal });
|
|
565
563
|
if (!response.ok) {
|