about summary refs log tree commit diff
path: root/src/view/com/util/images/Image.tsx
blob: ece0fbb04d1734ca08c81e89ce03044cff7ae12d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
import {Image, type ImageProps, type 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 accessibilityIgnoresInvertColors source={updatedSource} {...props} />
  )
}