only fetch referrals on dotcom. half-step to #286
This commit is contained in:
parent
bb8977b017
commit
72ac5d8b30
1 changed files with 3 additions and 0 deletions
|
|
@ -67,6 +67,9 @@
|
|||
let referrals: Article[] = $state([]);
|
||||
|
||||
const getReferrals = async () => {
|
||||
if (typeof window === 'undefined') return;
|
||||
// fetch only reliably works on prod sites
|
||||
if (window?.location?.hostname !== 'www.reuters.com') return;
|
||||
const isCollection = Boolean(collection);
|
||||
const API = isCollection ? COLLECTION_API : SECTION_API;
|
||||
try {
|
||||
|
|
|
|||
Loading…
Reference in a new issue