diff --git a/frontend/src/lib/config.ts b/frontend/src/lib/config.ts index f58111f..3b9bac1 100644 --- a/frontend/src/lib/config.ts +++ b/frontend/src/lib/config.ts @@ -1,4 +1,8 @@ -export const API_URL = import.meta.env.VITE_API_URL || 'http://localhost:3000'; +export const API_URL = + import.meta.env.VITE_API_URL || + (typeof window !== 'undefined' && window.location.hostname !== 'localhost' + ? 'https://api.scraps.hackclub.com' + : 'http://localhost:3000'); export interface ServerConfig { scrapsPerDollar: number;