|
|
@ -1,7 +1,6 @@
|
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
import React, { Component } from 'react';
|
|
|
|
import React, { Component } from 'react';
|
|
|
|
import { align, icons } from 'Helpers/Props';
|
|
|
|
import { align, icons } from 'Helpers/Props';
|
|
|
|
import hasDifferentItems from 'Utilities/Object/hasDifferentItems';
|
|
|
|
|
|
|
|
import LoadingIndicator from 'Components/Loading/LoadingIndicator';
|
|
|
|
import LoadingIndicator from 'Components/Loading/LoadingIndicator';
|
|
|
|
import Table from 'Components/Table/Table';
|
|
|
|
import Table from 'Components/Table/Table';
|
|
|
|
import TableBody from 'Components/Table/TableBody';
|
|
|
|
import TableBody from 'Components/Table/TableBody';
|
|
|
@ -17,26 +16,6 @@ import HistoryRowConnector from './HistoryRowConnector';
|
|
|
|
|
|
|
|
|
|
|
|
class History extends Component {
|
|
|
|
class History extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// Lifecycle
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
shouldComponentUpdate(nextProps) {
|
|
|
|
|
|
|
|
// Don't update when fetching has completed if items have changed,
|
|
|
|
|
|
|
|
// before episodes start fetching or when episodes start fetching.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (
|
|
|
|
|
|
|
|
(
|
|
|
|
|
|
|
|
this.props.isFetching &&
|
|
|
|
|
|
|
|
nextProps.isPopulated &&
|
|
|
|
|
|
|
|
hasDifferentItems(this.props.items, nextProps.items)
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
) {
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// Render
|
|
|
|
// Render
|
|
|
|
|
|
|
|
|
|
|
|