Merge branch 'analytics' into dev

This commit is contained in:
Mike Cao committed 2026-06-04 19:56:02 -07:00
commit de487e572e
3 files changed
+28 -24

No files matched your search

+6 -2
View File
@@ -36,8 +36,12 @@ export function getApiUrl(url: string, options: ApiUrlOptions = {}) {
}
const { apiUrl = process.env.apiUrl || '', basePath = process.env.basePath || '' } = options;
const useApiUrl = apiUrl && !isAbsoluteUrl(apiUrl) && !isAppRoute(url);
const baseUrl = useApiUrl ? joinPath(basePath, apiUrl) : joinPath(basePath, '/api');
const useApiUrl = apiUrl && !isAppRoute(url);
const baseUrl = useApiUrl
? isAbsoluteUrl(apiUrl)
? apiUrl
: joinPath(basePath, apiUrl)
: joinPath(basePath, '/api');
return joinPath(baseUrl, url);
}