Add enabled sites marker from data object

This commit is contained in:
Franc Camps-Febrer
2019-01-31 12:42:52 -05:00
parent 3efdf48c52
commit c2cd703f06
6 changed files with 9 additions and 6 deletions

View File

@@ -9,7 +9,7 @@ export const getActiveNarrative = state => state.app.narrative
export const getActiveStep = state => state.app.narrativeState.current
export const getSelected = state => state.app.selected
export const getSites = (state) => {
if (process.env.features.USE_SITES) return state.domain.sites
if (process.env.features.USE_SITES) return state.domain.sites.filter(s => !!(+s.enabled))
return []
}
export const getSources = state => {