Ensure movies are populated in PageConnector

This commit is contained in:
Bogdan 2024-03-14 11:21:56 +02:00
parent a7720e829d
commit f38545f852
1 changed files with 6 additions and 0 deletions

View File

@ -45,6 +45,7 @@ const selectAppProps = createSelector(
); );
const selectIsPopulated = createSelector( const selectIsPopulated = createSelector(
(state) => state.movies.isPopulated,
(state) => state.customFilters.isPopulated, (state) => state.customFilters.isPopulated,
(state) => state.tags.isPopulated, (state) => state.tags.isPopulated,
(state) => state.settings.ui.isPopulated, (state) => state.settings.ui.isPopulated,
@ -56,6 +57,7 @@ const selectIsPopulated = createSelector(
(state) => state.movieCollections.isPopulated, (state) => state.movieCollections.isPopulated,
(state) => state.app.translations.isPopulated, (state) => state.app.translations.isPopulated,
( (
moviesIsPopulated,
customFiltersIsPopulated, customFiltersIsPopulated,
tagsIsPopulated, tagsIsPopulated,
uiSettingsIsPopulated, uiSettingsIsPopulated,
@ -68,6 +70,7 @@ const selectIsPopulated = createSelector(
translationsIsPopulated translationsIsPopulated
) => { ) => {
return ( return (
moviesIsPopulated &&
customFiltersIsPopulated && customFiltersIsPopulated &&
tagsIsPopulated && tagsIsPopulated &&
uiSettingsIsPopulated && uiSettingsIsPopulated &&
@ -83,6 +86,7 @@ const selectIsPopulated = createSelector(
); );
const selectErrors = createSelector( const selectErrors = createSelector(
(state) => state.movies.error,
(state) => state.customFilters.error, (state) => state.customFilters.error,
(state) => state.tags.error, (state) => state.tags.error,
(state) => state.settings.ui.error, (state) => state.settings.ui.error,
@ -94,6 +98,7 @@ const selectErrors = createSelector(
(state) => state.movieCollections.error, (state) => state.movieCollections.error,
(state) => state.app.translations.error, (state) => state.app.translations.error,
( (
moviesError,
customFiltersError, customFiltersError,
tagsError, tagsError,
uiSettingsError, uiSettingsError,
@ -106,6 +111,7 @@ const selectErrors = createSelector(
translationsError translationsError
) => { ) => {
const hasError = !!( const hasError = !!(
moviesError ||
customFiltersError || customFiltersError ||
tagsError || tagsError ||
uiSettingsError || uiSettingsError ||