mirror of
https://github.com/documenso/documenso.git
synced 2025-11-12 07:43:16 +10:00
Compare commits
3 Commits
d25565b7d0
...
fix/sitema
| Author | SHA1 | Date | |
|---|---|---|---|
| 77231e31f7 | |||
| 3d7912586e | |||
| a67894f384 |
@ -1,20 +1,20 @@
|
|||||||
/* eslint-disable turbo/no-undeclared-env-vars */
|
/* eslint-disable turbo/no-undeclared-env-vars */
|
||||||
import { NEXT_PUBLIC_WEBAPP_URL } from '../constants/app';
|
import { APP_BASE_URL } from '../constants/app';
|
||||||
|
|
||||||
export const getBaseUrl = () => {
|
export const getBaseUrl = () => {
|
||||||
if (typeof window !== 'undefined') {
|
if (typeof window !== 'undefined') {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const marketingAppUrl = APP_BASE_URL();
|
||||||
|
|
||||||
|
if (marketingAppUrl) {
|
||||||
|
return marketingAppUrl;
|
||||||
|
}
|
||||||
|
|
||||||
if (process.env.VERCEL_URL) {
|
if (process.env.VERCEL_URL) {
|
||||||
return `https://${process.env.VERCEL_URL}`;
|
return `https://${process.env.VERCEL_URL}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
const webAppUrl = NEXT_PUBLIC_WEBAPP_URL();
|
|
||||||
|
|
||||||
if (webAppUrl) {
|
|
||||||
return webAppUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
return `http://localhost:${process.env.PORT ?? 3000}`;
|
return `http://localhost:${process.env.PORT ?? 3000}`;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user