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