AК
Size: a a a
AК
ЮС
ДА
export const Image: FC<ImageProps> = (props) => {
const { style, placeholderBackgroundColor, onLoadEnd, ...otherProps } = props;
const theme = useTheme();
const [opacity] = useState(() => new Animated.Value(0));
const backgroundColor = useMemo(
() => placeholderBackgroundColor ?? theme.colors.backgroundTertiary,
[theme, placeholderBackgroundColor],
);
const handleLoadEnd = useCallback(
(p) => {
console.log('onLoadEnd');
Animated.timing(opacity, {
toValue: 1,
duration: 150,
easing: Easing.linear,
}).start();
if (onLoadEnd) {
onLoadEnd();
}
},
[onLoadEnd, opacity],
);
return (
<View
style={[
style,
{
backgroundColor,
},
]}
>
<Animated.Image
onLoadEnd={handleLoadEnd}
style={[
style,
{
opacity,
},
]}
{...otherProps}
/>
</View>
);
};
AM
GB
ДА
ДА
GB
AM
ДА
GB
ДА
AS
GB
YK
DT
G
AM
AK
AM