first commit
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
const WEB_BASE_URL = process.env.EXPO_PUBLIC_WEB_URL || "http://localhost:3000";
|
||||
|
||||
export function getPublicMenuUrl(slug: string): string {
|
||||
if (WEB_BASE_URL.includes("menul.io")) {
|
||||
return `https://${slug}.menul.io`;
|
||||
}
|
||||
return `${WEB_BASE_URL}/menu/${slug}`;
|
||||
}
|
||||
|
||||
export function getPublicMenuDisplayUrl(slug: string): string {
|
||||
if (WEB_BASE_URL.includes("menul.io")) {
|
||||
return `${slug}.menul.io`;
|
||||
}
|
||||
return `${WEB_BASE_URL.replace(/^https?:\/\//, "")}/menu/${slug}`;
|
||||
}
|
||||
Reference in New Issue
Block a user