mirror of
https://github.com/lukevella/rallly.git
synced 2025-08-03 00:19:03 +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() {
|
||||
return process.env.NEXT_PUBLIC_BASE_URL ?? process.env.NEXT_PUBLIC_VERCEL_URL
|
||||
const getVercelUrl = () => {
|
||||
return process.env.NEXT_PUBLIC_VERCEL_URL
|
||||
? `https://${process.env.NEXT_PUBLIC_VERCEL_URL}`
|
||||
: typeof window !== "undefined"
|
||||
? window.origin
|
||||
: "http://localhost:3000";
|
||||
: null;
|
||||
};
|
||||
|
||||
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