Added promotions to redux and added selector for setting promotions if not PRO

• Added:
- promotions to redux
- selector for setting promotions if not PRO

• Updated:
- StatusList, SidebarPanelGroup to use promotions from redux
This commit is contained in:
mgabdev
2020-11-09 13:28:43 -06:00
parent f806fddb5f
commit 21937d9e09
9 changed files with 123 additions and 23 deletions

View File

@@ -10,6 +10,7 @@ import moment from 'moment-mini'
import { ScrollContext } from 'react-router-scroll-4'
import { IntlProvider, addLocaleData } from 'react-intl'
import { fetchCustomEmojis } from '../actions/custom_emojis'
import { fetchPromotions } from '../actions/promotions'
import { hydrateStore } from '../actions/store'
import { MIN_ACCOUNT_CREATED_AT_ONBOARDING } from '../constants'
import {
@@ -32,6 +33,7 @@ const hydrateAction = hydrateStore(initialState)
store.dispatch(hydrateAction)
store.dispatch(fetchCustomEmojis())
store.dispatch(fetchPromotions())
const mapStateToProps = (state) => ({
accountCreatedAt: !!me ? state.getIn(['accounts', me, 'created_at']) : undefined,