Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function createFixtureUrl(
host: string,
fixtureId: FixtureId,
fullScreen: boolean
) {
if (fullScreen) {
const query = stringifyRendererUrlQuery({ _fixtureId: fixtureId });
return `${host}/${RENDERER_FILENAME}?${query}`;
}
const query = stringifyPlaygroundUrlQuery({ fixtureId });
return `${host}/?${query}`;
}
const onSelect = React.useCallback(() => {
const query = stringifyRendererUrlQuery({ _fixtureId: fixtureId });
const fixtureUrl = `${rendererUrl}?${query}`;
window.open(fixtureUrl, '_blank');
}, [fixtureId, rendererUrl]);