fix: use window.location.origin instead of localhost:4001 for frontend display URL

This commit is contained in:
Mohan Ki
2026-07-27 16:44:48 +05:30
parent e6e448a2a9
commit dc5ecd4efb
+1 -1
View File
@@ -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 (
<div className="p-8 max-w-7xl mx-auto font-sans relative">