update the domains

This commit is contained in:
root
2026-05-16 16:51:59 -04:00
parent 4408f7cc8f
commit 7e4fb6d62a
9 changed files with 50 additions and 44 deletions
+7 -6
View File
@@ -1,17 +1,18 @@
import { resolveBrowserAppUrl } from '@/lib/appUrls'
function toAppOrigin(url: string): string {
function toAppBase(url: string): string {
try {
return new URL(url).origin
const u = new URL(url)
return (u.origin + u.pathname).replace(/\/$/, '')
} catch {
return url.replace(/\/$/, '')
}
}
export const marketplaceUrl = toAppOrigin(
resolveBrowserAppUrl(process.env.NEXT_PUBLIC_MARKETPLACE_URL ?? 'http://localhost:3000'),
export const marketplaceUrl = toAppBase(
resolveBrowserAppUrl(process.env.NEXT_PUBLIC_MARKETPLACE_URL ?? 'http://localhost:3000/marketplace'),
)
export const adminUrl = toAppOrigin(
resolveBrowserAppUrl(process.env.NEXT_PUBLIC_ADMIN_URL ?? 'http://localhost:3002'),
export const adminUrl = toAppBase(
resolveBrowserAppUrl(process.env.NEXT_PUBLIC_ADMIN_URL ?? 'http://localhost:3002/admin'),
)