// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // See LICENSE.txt for license information. import React from 'react'; import {Image, type ColorValue, type StyleProp, type ImageStyle} from 'react-native'; import FastImage, {type ImageStyle as FastImageStyle, type Source} from 'react-native-fast-image'; import Animated, {type SharedValue} from 'react-native-reanimated'; const AnimatedFastImage = Animated.createAnimatedComponent(FastImage); const AnimatedImage = Animated.createAnimatedComponent(Image); type ThumbnailProps = { onError: () => void; opacity?: SharedValue; source?: Source; style: StyleProp; tintColor?: ColorValue; } const Thumbnail = ({onError, opacity, style, source, tintColor}: ThumbnailProps) => { if (source?.uri) { return ( )} testID='progressive_image.miniPreview' /> ); } return ( ); }; export default Thumbnail;