Improve messaging for failed movie details data

pull/9150/head
Bogdan 1 year ago
parent ff3d38a515
commit 336cb4a2bc

@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
import React, { Component } from 'react'; import React, { Component } from 'react';
import { Tab, TabList, TabPanel, Tabs } from 'react-tabs'; import { Tab, TabList, TabPanel, Tabs } from 'react-tabs';
import TextTruncate from 'react-text-truncate'; import TextTruncate from 'react-text-truncate';
import Alert from 'Components/Alert';
import Icon from 'Components/Icon'; import Icon from 'Components/Icon';
import ImdbRating from 'Components/ImdbRating'; import ImdbRating from 'Components/ImdbRating';
import InfoLabel from 'Components/InfoLabel'; import InfoLabel from 'Components/InfoLabel';
@ -634,24 +635,27 @@ class MovieDetails extends Component {
<div className={styles.contentContainer}> <div className={styles.contentContainer}>
{ {
!isFetching && movieFilesError && !isFetching && movieFilesError ?
<div> <Alert kind={kinds.DANGER}>
{translate('LoadingMovieFilesFailed')} {translate('LoadingMovieFilesFailed')}
</div> </Alert> :
null
} }
{ {
!isFetching && movieCreditsError && !isFetching && movieCreditsError ?
<div> <Alert kind={kinds.DANGER}>
{translate('LoadingMovieCreditsFailed')} {translate('LoadingMovieCreditsFailed')}
</div> </Alert> :
null
} }
{ {
!isFetching && extraFilesError && !isFetching && extraFilesError ?
<div> <Alert kind={kinds.DANGER}>
{translate('LoadingMovieExtraFilesFailed')} {translate('LoadingMovieExtraFilesFailed')}
</div> </Alert> :
null
} }
<Tabs selectedIndex={selectedTabIndex} onSelect={this.onTabSelect}> <Tabs selectedIndex={selectedTabIndex} onSelect={this.onTabSelect}>

Loading…
Cancel
Save