MCPcopy Create free account
hub / github.com/adobe/react-spectrum / Track

Function Track

packages/dev/docs/src/Image.js:101–106  ·  view source on GitHub ↗
({src, srclang: srcLang, ...otherProps})

Source from the content-addressed store, hash-verified

99}
100
101export function Track({src, srclang: srcLang, ...otherProps}) {
102 let publicUrl = React.useContext(ImageContext);
103 let baseUrl = publicUrl.replace(/\/$/, '');
104 let url = baseUrl + '/' + path.basename(src);
105
106 return <track src={url} {...otherProps} srcLang={srcLang} />;
107}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected