diff --git a/src/client/reducers.js b/src/client/reducers.js index 0ef707117ac..33d686cfe62 100644 --- a/src/client/reducers.js +++ b/src/client/reducers.js @@ -181,41 +181,7 @@ import getInteractionReducer from './modules/Interactions/InteractionDetails/red import { PREVIEW_QUOTE_ID } from './modules/Omis/state' import orderQuoteReducer from './modules/Omis/reducer' -const parseProps = (domNode) => { - if (!domNode) { - return { - modulePermissions: [], - currentAdviserId: '', - currentAdviserName: '', - activeFeatures: null, - activeFeatureGroups: null, - userPermissions: [], - csrfToken: '', - } - } - return 'props' in domNode.dataset ? JSON.parse(domNode.dataset.props) : {} -} - -const appWrapper = document.getElementById('react-app') - -const { - modulePermissions, - currentAdviserId, - currentAdviserName, - activeFeatures, - activeFeatureGroups, - userPermissions, - csrfToken, -} = parseProps(appWrapper) - export const reducers = { - currentAdviserId: () => currentAdviserId, - currentAdviserName: () => currentAdviserName, - activeFeatures: () => activeFeatures, - activeFeatureGroups: () => activeFeatureGroups, - modulePermissions: () => modulePermissions, - userPermissions: () => userPermissions, - csrfToken: () => csrfToken, tasks, [FLASH_MESSAGE_ID]: flashMessageReducer, [COMPANY_LISTS_STATE_ID]: companyListsReducer, @@ -236,8 +202,6 @@ export const reducers = { ...ContactForm.reducerSpread, ...Form.reducerSpread, ...FieldAddAnother.reducerSpread, - // A reducer is required to be able to set a preloadedState parameter - referrerUrl: (state = {}) => state, [DNB_CHECK_ID]: dnbCheckReducer, [INVESTMENT_OPPORTUNITIES_LIST_ID]: investmentOpportunitiesListReducer, [INVESTMENT_OPPORTUNITIES_DETAILS_ID]: investmentOpportunitiesDetailsReducer,