Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import React from 'react';
import ProgressBar from 'react-uwp/ProgressBar';
import { CSSTransitionGroup } from 'react-transition-group';
import PropTypes from 'prop-types';
const ReactLazyLoad = require('react-lazyload').default;
class GridImage extends React.Component {
constructor(props) {
super(props);
const { zoom, onGridClick } = this.props;
this.gridWidth = 300 * zoom;
this.gridHeight = 140 * zoom;
this.onGridClick = onGridClick;
this.handleClick = this.handleClick.bind(this);
}
shouldComponentUpdate(nextProps) {
const { progress } = this.props;
return !(progress === nextProps.progress);
import * as React from "react";
import * as PropTypes from "prop-types";
const ReactLazyLoad = require("react-lazyload").default;
import Icon from "../Icon";
export interface DataProps {
/**
* Toggle LazyLoad mode open, powerful base on [react-lazyload](https://github.com/jasonslyvia/react-lazyload).
*/
useLazyLoad?: boolean;
/**
* Use Div backgroundImage.
*/
useDivContainer?: boolean;
/**
* Once the lazy loaded component is loaded, do not detect scroll/resize event anymore. Useful for images or simple components.
*/
once?: boolean;
render() {
const { roomTypes, movie, timesStrings } = this.props;
return (React.createElement("article", { className: "card", style: { display: 'flex' } },
React.createElement(react_router_dom_1.Link, { to: `/movie/${movie.yahooId}` },
React.createElement(react_lazyload_1.default, null,
React.createElement("img", { className: "poster", src: this.getSmallPosterSrc(movie), alt: "Image not found" }))),
React.createElement("div", { className: "col-xs-12" },
React.createElement("header", { style: { paddingTop: '.5em' } },
React.createElement(react_router_dom_1.Link, { style: { color: 'inherit' }, to: `/movie/${movie.yahooId}` },
React.createElement("h3", { className: "title" },
movie.chineseTitle,
roomTypes && roomTypes.length > 0 && React.createElement("span", { style: { marginLeft: '.2em' } }, roomTypes.map((roomType, index) => roomType)))),
React.createElement(react_router_dom_1.Link, { style: { color: 'inherit' }, to: `/movie/${movie.yahooId}` },
React.createElement("small", null, movie.englishTitle))),
React.createElement("div", { className: "resultInfo" },
React.createElement(react_router_dom_1.Link, { style: { color: 'inherit' }, to: `/movie/${movie.yahooId}` },
React.createElement("div", null,
"\u4E0A\u6620\u65E5\u671F\uFF1A",
movie.releaseDate || '未提供'),
React.createElement("div", { className: "hidden-xs" },
"\u985E\u578B\uFF1A",