From dc5ecd4efbb127b0c9c8b2c8326267070b5c89ff Mon Sep 17 00:00:00 2001 From: Mohan Ki Date: Mon, 27 Jul 2026 16:44:48 +0530 Subject: [PATCH] fix: use window.location.origin instead of localhost:4001 for frontend display URL --- client/src/app/dashboard/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/app/dashboard/page.tsx b/client/src/app/dashboard/page.tsx index f35a010..6d5f1ec 100644 --- a/client/src/app/dashboard/page.tsx +++ b/client/src/app/dashboard/page.tsx @@ -98,7 +98,7 @@ export default function DashboardPage() { }; const totalScans = qrs.reduce((sum, qr) => sum + Number(qr.scans), 0); - const baseUrl = process.env.NEXT_PUBLIC_APP_URL || 'http://localhost:4001'; + const baseUrl = typeof window !== 'undefined' ? window.location.origin : (process.env.NEXT_PUBLIC_APP_URL || 'https://qr.houseofwebsites.ai'); return (