Skip to content

Commit

Permalink
Ensure authors are populated in PageConnector
Browse files Browse the repository at this point in the history
  • Loading branch information
mynameisbogdan committed Mar 15, 2024
1 parent 490041d commit 1aa746b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions frontend/src/Components/Page/PageConnector.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ const selectAppProps = createSelector(
);

const selectIsPopulated = createSelector(
(state) => state.authors.isPopulated,
(state) => state.customFilters.isPopulated,
(state) => state.tags.isPopulated,
(state) => state.settings.ui.isPopulated,
Expand All @@ -62,6 +63,7 @@ const selectIsPopulated = createSelector(
(state) => state.system.status.isPopulated,
(state) => state.app.translations.isPopulated,
(
authorsIsPopulated,
customFiltersIsPopulated,
tagsIsPopulated,
uiSettingsIsPopulated,
Expand All @@ -74,6 +76,7 @@ const selectIsPopulated = createSelector(
translationsIsPopulated
) => {
return (
authorsIsPopulated &&
customFiltersIsPopulated &&
tagsIsPopulated &&
uiSettingsIsPopulated &&
Expand All @@ -89,6 +92,7 @@ const selectIsPopulated = createSelector(
);

const selectErrors = createSelector(
(state) => state.authors.error,
(state) => state.customFilters.error,
(state) => state.tags.error,
(state) => state.settings.ui.error,
Expand All @@ -100,6 +104,7 @@ const selectErrors = createSelector(
(state) => state.system.status.error,
(state) => state.app.translations.error,
(
authorsError,
customFiltersError,
tagsError,
uiSettingsError,
Expand All @@ -112,6 +117,7 @@ const selectErrors = createSelector(
translationsError
) => {
const hasError = !!(
authorsError ||
customFiltersError ||
tagsError ||
uiSettingsError ||
Expand Down

0 comments on commit 1aa746b

Please sign in to comment.