1 import { config } from "../config"
2 import basePathUrl from "./base-path-url"
3
4 /**
5 * Build an absolute API reference URL from a page path (without basePath),
6 * e.g. `getUrl("/store/carts/get-a-cart")`.
7 */
8 export default function getUrl(path: string): string {
9 return `${config.baseUrl}${basePathUrl(path)}`
10 }