From 70cf0c1d9a50298d1a67661ef8e247cc828fc674 Mon Sep 17 00:00:00 2001 From: Andres Date: Thu, 24 Apr 2025 01:23:19 +0200 Subject: [PATCH] update stream card, update leaderboards on match finished webhook --- src/trpc/react.tsx | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/trpc/react.tsx b/src/trpc/react.tsx index 3de03ad..8aa199a 100644 --- a/src/trpc/react.tsx +++ b/src/trpc/react.tsx @@ -87,12 +87,7 @@ export function TRPCReactProvider(props: { children: React.ReactNode }) { } function getBaseUrl() { - const url = - process.env.NEXT_PUBLIC_API_URL || - (typeof window !== 'undefined' - ? window.location.origin - : `http://localhost:${process.env.PORT ?? 3000}`) - - console.log('using base url:', url) - return url + if (typeof window !== 'undefined') return window.location.origin + if (process.env.VERCEL_URL) return `https://${process.env.VERCEL_URL}` + return `http://localhost:${process.env.PORT ?? 3000}` }