Skip to content

Commit 182a1eb

Browse files
committed
fix preview
1 parent 51a9871 commit 182a1eb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

apps/web/src/lib/constants.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
import dynamic from 'next/dynamic';
22

33
export const baseURL = (() => {
4+
// Preview deployments
5+
if (process.env.VERCEL_PUBLIC_ENV === 'preview') {
6+
return `https://${process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL}`;
7+
}
8+
49
// Production URL
510
if (process.env.NEXT_PUBLIC_VERCEL_URL) {
611
return `https://${process.env.NEXT_PUBLIC_VERCEL_URL}`;

0 commit comments

Comments
 (0)