Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
onClick={() => history.push(sandboxUrl(template.sandbox))}
/>
function SandboxCard({ hit }) {
return (
<header>
<title>
{hit.title ? (
<Highlight attribute="title" hit={hit} />
) : (
hit.objectID
)}
</title>
tag.length < 20)}
/>
</header>
updateSandboxUrl(
{
id,
alias,
git,
}: {
id?: string;
alias?: string;
git?: GitInfo;
},
{ openInNewWindow = false }: { openInNewWindow?: boolean } = {}
) {
const url = sandboxUrl({
id,
alias,
git,
});
if (openInNewWindow) {
window.open(url, '_blank');
} else {
history.push(url);
}
},
redirectToNewSandbox() {
.then(data => {
window.history.replaceState({}, null, sandboxUrl(data));
return { data };
})
.catch(error => ({ error }));
export const getEditorUrl = (sandbox, mainModule, state) =>
protocolAndHost() +
sandboxUrl(sandbox) +
getOptionsUrl(sandbox, mainModule, state);
setTimeout(() => {
history.push(sandboxUrl({ id: shortid }));
}, 300);
}
<button aria-label="{sandbox.userLiked">
</button>
) : null}
<button href="{`${sandboxUrl(sandbox)}?from-embed`}" rel="noopener noreferrer">
Open Sandbox
</button>
);
}
? () => (
{
evt.stopPropagation();
actions.modalClosed();
}}
to={sandboxUrl(template.sandbox)}
>
)
: undefined
const selectSandbox = ({ alias, git, objectID }) =>
window.open(sandboxUrl({ alias, id: objectID, git }));
onClick={() => history.push(sandboxUrl(template.sandbox))}
/>