Skip to content

Commit

Permalink
getHostname fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bring-shrubbery committed Dec 5, 2023
1 parent 276968a commit b417752
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apps/nextjs/src/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ export function cn(...inputs: ClassValue[]) {
}

export const getHostname = () => {
if ("VERCEL" in process.env && process.env["VERCEL"] === "1") {
return `https://${process.env["VERCEL_URL"]}`;
}

return process.env.NODE_ENV === "production"
? "https://svg-to-swiftui.quassum.com"
: "http://localhost:3000";
Expand Down

0 comments on commit b417752

Please sign in to comment.