mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
12 lines
301 B
TypeScript
12 lines
301 B
TypeScript
import { env } from "@/env.mjs";
|
|
|
|
export const getServerUrl = () => {
|
|
if (typeof window !== "undefined") {
|
|
return window.location.origin;
|
|
}
|
|
if (env.NODE_ENV === "development") {
|
|
return `${env.NEXT_PUBLIC_PROJECT_URL}`;
|
|
}
|
|
return `${env.NEXT_PUBLIC_PROJECT_URL}`;
|
|
};
|