Revert "Fixed: Ensure translations are fetched before loading app"

This reverts commit eeaea17c1f.
This commit is contained in:
Bogdan 2023-07-16 04:15:48 +03:00
commit 43c892b89d
6 changed files with 18 additions and 38 deletions

View file

@ -7,7 +7,6 @@ function ErrorPage(props) {
const {
version,
isLocalStorageSupported,
hasTranslationsError,
artistError,
customFiltersError,
tagsError,
@ -21,8 +20,6 @@ function ErrorPage(props) {
if (!isLocalStorageSupported) {
errorMessage = 'Local Storage is not supported or disabled. A plugin or private browsing may have disabled it.';
} else if (hasTranslationsError) {
errorMessage = 'Failed to load translations from API';
} else if (artistError) {
errorMessage = getErrorMessage(artistError, 'Failed to load artist from API');
} else if (customFiltersError) {
@ -55,7 +52,6 @@ function ErrorPage(props) {
ErrorPage.propTypes = {
version: PropTypes.string.isRequired,
isLocalStorageSupported: PropTypes.bool.isRequired,
hasTranslationsError: PropTypes.bool.isRequired,
artistError: PropTypes.object,
customFiltersError: PropTypes.object,
tagsError: PropTypes.object,

View file

@ -220,7 +220,6 @@ class PageConnector extends Component {
render() {
const {
hasTranslationsError,
isPopulated,
hasError,
dispatchFetchArtist,
@ -234,12 +233,11 @@ class PageConnector extends Component {
...otherProps
} = this.props;
if (hasTranslationsError || hasError || !this.state.isLocalStorageSupported) {
if (hasError || !this.state.isLocalStorageSupported) {
return (
<ErrorPage
{...this.state}
{...otherProps}
hasTranslationsError={hasTranslationsError}
/>
);
}
@ -260,7 +258,6 @@ class PageConnector extends Component {
}
PageConnector.propTypes = {
hasTranslationsError: PropTypes.bool.isRequired,
isPopulated: PropTypes.bool.isRequired,
hasError: PropTypes.bool.isRequired,
isSidebarVisible: PropTypes.bool.isRequired,