// @flow import * as React from 'react'; import { Img, FallbackImg, LoadingImg } from './style'; import VisibilitySensor from 'react-visibility-sensor'; type Props = { src: any, type: 'user' | 'community', size: number, mobilesize?: number, isClickable?: boolean, alt: string, }; export default class Image extends React.Component { render() { const { type, size, mobilesize } = this.props; const { ...rest } = this.props; const fallbackSrc = type === 'user' ? '/img/default_avatar.svg' : '/img/default_community.svg'; return ( } unloader={ } /> ); } }