about summary refs log tree commit diff
path: root/src/view/com/util/images/Image.tsx
blob: e3d0d7fcc2bc3b45bdb819bf11bdc3d9194a6edd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
import React from 'react'
import {Image, ImageProps, ImageSource} from 'expo-image'

interface HighPriorityImageProps extends ImageProps {
  source: ImageSource
}
export function HighPriorityImage({source, ...props}: HighPriorityImageProps) {
  const updatedSource = {
    uri: typeof source === 'object' && source ? source.uri : '',
  } satisfies ImageSource
  return <Image source={updatedSource} {...props} />
}