(library: 'react-aria' | 's2')
| 14 | }; |
| 15 | |
| 16 | export 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 | |
| 27 | export function getRSCUrl(pathname: string) { |
| 28 | let url = new URL(pathname, location.href); |
no outgoing calls
no test coverage detected