Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
{
let Comp = getComponentForPath(cleanPath(props.location.pathname))
let is404 = props.location.pathname === '404'
if (!Comp) {
is404 = true
Comp = getComponentForPath('404')
}
return Comp ? : null
}} />
)
const getComponentForPath = path => {
path = cleanPath(path)
return global.componentsByTemplateID[global.templateIDsByPath[path]]
}
const getComponentForPath = path => {
path = cleanPath(path)
return global.componentsByTemplateID[global.templateIDsByPath[path]]
}
const getComponentForPath = path => {
path = cleanPath(path)
return global.componentsByTemplateID[global.templateIDsByPath[path]]
}