import { ComponentProps } from 'react' import FastImage from 'react-native-fast-image' import { SolitoImageProps } from '../image.types' import { useSolitoImage } from '../use-solito-image' export default function SolitoFastImage( props: Omit & Pick, 'style' | 'resizeMode' | 'testID'> ) { const { source, resizeMode, onLoadingComplete, onError, style, ...imageProps } = useSolitoImage(props as SolitoImageProps) return ( onLoadingComplete(e.nativeEvent))} onError={onError} // @ts-expect-error this is fine style={style} {...imageProps} /> ) }