mirror of
https://github.com/Dvorinka/MyClubServer.git
synced 2026-06-05 03:02:56 +00:00
@@ -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([
|
||||
|
||||
Reference in New Issue
Block a user