Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
static openNativeFromWeb(props, ev) {
const { href, slug, nativePath, onAppSwitch } = props
const appInfo = NATIVE_APP_INFOS[slug]
if (ev) {
ev.preventDefault()
}
AppLinker.onAppSwitch(onAppSwitch)
openDeeplinkOrRedirect(
appInfo.uri + (nativePath === '/' ? '' : nativePath),
function() {
window.location.href = href
}
)
}