feat(ssr): server side render some things to speed up page loads
All checks were successful
deploy / deploy (push) Successful in 1m12s

This commit is contained in:
Lee
2023-11-08 07:41:07 +00:00
parent 3a6312510a
commit c251239e45
11 changed files with 344 additions and 321 deletions

View File

@ -23,7 +23,12 @@ export class FetchQueue {
);
}
const response = await fetch(url, options);
const response = await fetch(url, {
...options,
next: {
revalidate: 300, // 5 minutes
},
});
if (response.status === 429) {
const hasRetryAfterHeader = response.headers.has("retry-after");
let retryAfter = hasRetryAfterHeader