boilerplate/app/navigation/layouts.js
function handleOpenURL (event) {
  console.tron.log(event.url)
  let splitUrl = event.url.split('/') // ['https:', '', 'domain', 'route', 'params']
  let importantParameters = splitUrl.splice(3) // ['route', 'params']
  if (importantParameters.length === 0) {
    console.tron.log('Sending to home page')
    return null
  }
  if (importantParameters.length === 1) {
    switch (importantParameters[0]) {
      case 'register':
        console.tron.log(`Sending to Register Page`)
        registerScreen()
        break
      default:
        console.tron.warn(`Unhandled deep link: ${event.url}`)
      // default code block
    }
  }
}
function handleOpenURL (event) {
  console.tron.log(event.url)
  let splitUrl = event.url.split('/') // ['https:', '', 'domain', 'route', 'params']
  let importantParameters = splitUrl.splice(3) // ['route', 'params']
  if (importantParameters.length === 0) {
    console.tron.log('Sending to home page')
    return null
  }
  if (importantParameters.length === 1) {
    switch (importantParameters[0]) {
      case 'register':
        console.tron.log(`Sending to Register Page`)
        registerScreen()
        break
      default:
        console.tron.warn(`Unhandled deep link: ${event.url}`)
      // default code block
    }
  }
}
function handleOpenURL ( event ) { console . tron . log ( event . url ) let splitUrl = event . url . split ( '/' ) // ['https:', '', 'domain', 'route', 'params'] let importantParameters = splitUrl . splice ( 3 ) // ['route', 'params'] if ( importantParameters . length === 0 ) { console . tron . log ( 'Sending to home page' ) return null } if ( importantParameters . length === 1 ) { switch ( importantParameters [ 0 ] ) { case 'register' : console . tron . log ( ` ` ) registerScreen ( ) break default : console . tron . warn ( ` ${ event . url } ` ) // default code block } } }
for deep linking
for deep linking