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 (