MCPcopy Index your code
hub / github.com/adobe/react-spectrum / getBaseUrl

Function getBaseUrl

packages/dev/s2-docs/src/pageUtils.ts:16–25  ·  view source on GitHub ↗
(library: 'react-aria' | 's2')

Source from the content-addressed store, hash-verified

14};
15
16export function getBaseUrl(library: 'react-aria' | 's2') {
17 let env = process.env.DOCS_ENV;
18 let base =
19 env && process.env.LIBRARY ? BASE_URL[env][library] : `http://localhost:1234/${library}`;
20 let publicUrl = process.env.PUBLIC_URL;
21 if (publicUrl) {
22 base += publicUrl.replace(/\/$/, '');
23 }
24 return base;
25}
26
27export function getRSCUrl(pathname: string) {
28 let url = new URL(pathname, location.href);

Callers 13

HomeHeaderFunction · 0.90
getResourceTagsFunction · 0.90
LinkFunction · 0.90
LinkButtonFunction · 0.90
Link.tsxFile · 0.90
resolveUrlFunction · 0.90
HeaderFunction · 0.90
getUrlFunction · 0.90
MobileHeaderFunction · 0.90
ShadcnCommandFunction · 0.90
buildRegistry.mjsFile · 0.90
createFeedFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected