Skip to content

Commit

Permalink
fix: set base website url to origin if available
Browse files Browse the repository at this point in the history
  • Loading branch information
nounspaceryan authored and j-paterson committed Jul 30, 2024
1 parent 7fd063b commit 9288b9c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/constants/app.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
export const WEBSITE_URL =
process.env.NEXT_PUBLIC_VERCEL_ENV === "preview"
? `https://${process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL}`
? typeof window !== "undefined"
? window.location.origin
: `https://${process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL}`
: process.env.NEXT_PUBLIC_URL;

export const APP_FID = process.env.NEXT_PUBLIC_APP_FID
? Number(process.env.NEXT_PUBLIC_APP_FID)
: undefined;

0 comments on commit 9288b9c

Please sign in to comment.