diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-04-11 12:12:34 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-11 12:12:34 -0700 |
commit | a683c9e15f959c4e55d38820ca5b991300ddb451 (patch) | |
tree | 8342b2bbde2c3c2236b25ebe902f1714660866b4 /src/view/com/util/images/Image.tsx | |
parent | 14c84732106e1db52e6818ac3814c54845ec1226 (diff) | |
download | voidsky-a683c9e15f959c4e55d38820ca5b991300ddb451.tar.zst |
replace react-native-fast-image with expo-image (#452)
Diffstat (limited to 'src/view/com/util/images/Image.tsx')
-rw-r--r-- | src/view/com/util/images/Image.tsx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/view/com/util/images/Image.tsx b/src/view/com/util/images/Image.tsx index 8c95a581e..e3d0d7fcc 100644 --- a/src/view/com/util/images/Image.tsx +++ b/src/view/com/util/images/Image.tsx @@ -1,12 +1,12 @@ import React from 'react' -import FastImage, {FastImageProps, Source} from 'react-native-fast-image' -export default FastImage -export type {OnLoadEvent, ImageStyle, Source} from 'react-native-fast-image' +import {Image, ImageProps, ImageSource} from 'expo-image' -export function HighPriorityImage({source, ...props}: FastImageProps) { +interface HighPriorityImageProps extends ImageProps { + source: ImageSource +} +export function HighPriorityImage({source, ...props}: HighPriorityImageProps) { const updatedSource = { uri: typeof source === 'object' && source ? source.uri : '', - priority: FastImage.priority.high, - } as Source - return <FastImage source={updatedSource} {...props} /> + } satisfies ImageSource + return <Image source={updatedSource} {...props} /> } |