import { getShareExtensionKey } from 'expo-share-intent'

export function redirectSystemPath({
  path,
  initial: _initial,
}: {
  path: string
  initial: boolean
}) {
  try {
    if (path.includes(`dataUrl=${getShareExtensionKey()}`)) {
      return '/camera'
    }
    return path
  } catch {
    return '/'
  }
}
