diff --git a/next.config.js b/next.config.js index 2548ca6e6..5d22863c6 100644 --- a/next.config.js +++ b/next.config.js @@ -38,6 +38,10 @@ const nextConfig = { distDir: 'dist/website', reactStrictMode: false, + + experimental: { + workerThreads: false, + }, }; export default nextConfig; diff --git a/src/core/blitz/getRatingInfo.ts b/src/core/blitz/getRatingInfo.ts index c900bb101..d85a7e1d9 100644 --- a/src/core/blitz/getRatingInfo.ts +++ b/src/core/blitz/getRatingInfo.ts @@ -16,7 +16,6 @@ export default async function getRatingInfo(region: Region) { region, )}.wotblitz.com/en/api/rating-leaderboards/season/`, undefined, - { cache: 'no-store' }, ); const data = (await response.json()) as RatingInfo; diff --git a/src/core/blitzkit/patientFetchJSON.ts b/src/core/blitzkit/patientFetchJSON.ts deleted file mode 100644 index de3a31105..000000000 --- a/src/core/blitzkit/patientFetchJSON.ts +++ /dev/null @@ -1,23 +0,0 @@ -export async function patientFetchJSON( - url: string, - timeout = 1000, - options?: Partial<{ cache: 'no-store' }>, -) { - let patientJSON: Type; - - while (patientJSON! === undefined) { - try { - patientJSON = (await fetch(url, options).then((response) => - response.json(), - )) as Type; - } catch (error) { - console.warn( - `Failed to fetch ${url} as JSON; retrying in ${timeout}ms...`, - error, - ); - await new Promise((resolve) => setTimeout(resolve, timeout)); - } - } - - return patientJSON; -}