// The two destinations this page exists to route to. Set NEXT_PUBLIC_* to each // app's origin; the entry path is appended here so no deploy has to remember // it. Inlined at build time by `output: 'export'`, so these are passed as // Docker build args (see infrastructure/docker/Dockerfile.web), not runtime env. const origin = (url: string) => url.replace(/\/+$/, ""); // The passenger app serves its booking search at `/` — that is already the app. export const PASSENGER_URL = origin( process.env.NEXT_PUBLIC_PASSENGER_URL ?? "https://passenger.edrsc.com", ); // The freight app serves its own marketing landing at `/`, so link past it: // `/portal` is the app itself, and redirects to /login when signed out. export const FREIGHT_URL = `${origin( process.env.NEXT_PUBLIC_FREIGHT_URL ?? "https://freight.edrsc.com", )}/portal`;