hot fix #5 dev day #70

This commit is contained in:
Tomas Dvorak
2025-10-24 23:21:57 +02:00
parent b8839fc1ff
commit 81389c108f
13 changed files with 45 additions and 37 deletions
+2 -3
View File
@@ -61,7 +61,7 @@ const ArticleDetailPage: React.FC = () => {
queryKey: ['facr-cached-match', (matchLinkQuery.data as any)?.external_match_id],
enabled: Boolean((matchLinkQuery.data as any)?.external_match_id),
queryFn: async () => {
const origin = new URL(API_URL, typeof window !== 'undefined' ? window.location.origin : 'http://localhost:3000').origin;
const origin = new URL(API_URL, window.location.origin).origin;
const url = `${origin}/cache/prefetch/facr_club_info.json`;
const res = await fetch(url, { cache: 'no-cache' });
if (!res.ok) return null as any;
@@ -105,8 +105,7 @@ const ArticleDetailPage: React.FC = () => {
}
}
const apiUrl = process.env.REACT_APP_API_URL || 'http://localhost:8080/api/v1';
const origin = new URL(apiUrl).origin;
const origin = new URL(API_URL, window.location.origin).origin;
// Try to find album in both sources
const [profileRes, albumsRes] = await Promise.allSettled([