only fetch referrals on dotcom. half-step to #286

This commit is contained in:
hobbes7878 2025-04-24 18:01:45 +01:00
parent bb8977b017
commit 72ac5d8b30
Failed to extract signature

View file

@ -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 {