mirror of
https://github.com/lukevella/rallly.git
synced 2025-08-06 09:59:00 +02:00
Revert changes to absolute-url (#194)
This commit is contained in:
parent
4ce5a1990e
commit
f666702527
1 changed files with 11 additions and 5 deletions
|
@ -1,7 +1,13 @@
|
||||||
export function absoluteUrl() {
|
const getVercelUrl = () => {
|
||||||
return process.env.NEXT_PUBLIC_BASE_URL ?? process.env.NEXT_PUBLIC_VERCEL_URL
|
return process.env.NEXT_PUBLIC_VERCEL_URL
|
||||||
? `https://${process.env.NEXT_PUBLIC_VERCEL_URL}`
|
? `https://${process.env.NEXT_PUBLIC_VERCEL_URL}`
|
||||||
: typeof window !== "undefined"
|
: null;
|
||||||
? window.origin
|
};
|
||||||
: "http://localhost:3000";
|
|
||||||
|
export function absoluteUrl() {
|
||||||
|
return (
|
||||||
|
process.env.NEXT_PUBLIC_BASE_URL ??
|
||||||
|
getVercelUrl() ??
|
||||||
|
"http://localhost:3000"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue