From 8589158f1269f98e0e508ef10785376d07c024d5 Mon Sep 17 00:00:00 2001 From: Atanas Krondev Date: Thu, 4 Jan 2024 10:25:40 +0200 Subject: [PATCH 1/2] CHORE: take the previous year as season during the first half of the year --- app/src/config/api.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/config/api.ts b/app/src/config/api.ts index f72ac64..a7dda60 100644 --- a/app/src/config/api.ts +++ b/app/src/config/api.ts @@ -4,7 +4,10 @@ export const liveGameStatuses = ['1H', '2H', 'HT', 'ET', 'BT', 'PT'] export const currentGameStatuses = ['NS', ...liveGameStatuses] -export const currentSeason = new Date().getFullYear() +const currentMonth = new Date().getMonth() + +export const currentSeason = + currentMonth < 6 ? new Date().getFullYear() - 1 : new Date().getFullYear() export const leaguesCountLimit = 5 From 61b0cc40a56cf73ea7f868fd2bac92e8e6240325 Mon Sep 17 00:00:00 2001 From: Atanas Krondev Date: Thu, 4 Jan 2024 10:26:31 +0200 Subject: [PATCH 2/2] CHORE:adjust url pattern for logos fetched from the API --- app/next.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/next.config.js b/app/next.config.js index 08e1d92..2e7feaf 100644 --- a/app/next.config.js +++ b/app/next.config.js @@ -5,7 +5,7 @@ module.exports = { remotePatterns: [ { protocol: 'https', - hostname: 'media-?.api-sports.io', + hostname: 'media*.api-sports.io', }, ], },