core-app-worona
Advanced tools
Comparing version 1.4.21 to 1.4.22
{ | ||
"name": "core-app-worona", | ||
"version": "1.4.21", | ||
"version": "1.4.22", | ||
"description": "Core Package of Worona App", | ||
@@ -5,0 +5,0 @@ "scripts": { |
import * as types from '../types'; | ||
export const siteIdChanged = ({ siteId }) => ({ type: types.SITE_ID_CHANGED, siteId }); | ||
export const userIdChanged = ({ userId }) => ({ type: types.USER_ID_CHANGED, userId }); | ||
export const isPreview = () => ({ type: types.IS_PREVIEW }); | ||
export const deepUrlVisited = ({ url }) => ({ type: types.DEEP_URL_VISITED, url }); |
@@ -8,2 +8,4 @@ import { routerStateReducer } from 'redux-router'; | ||
return { ...state, siteId: action.siteId, ...routerStateReducer(state, action) }; | ||
case types.USER_ID_CHANGED: | ||
return { ...state, userId: action.userId, ...routerStateReducer(state, action) }; | ||
case types.IS_PREVIEW: | ||
@@ -10,0 +12,0 @@ return { ...state, preview: true, ...routerStateReducer(state, action) }; |
@@ -23,2 +23,5 @@ /* eslint-disable no-underscore-dangle, no-undef */ | ||
} | ||
if (window.__woronaUserId__) { | ||
yield put(actions.userIdChanged({ userId: window.__woronaUserId__ })); | ||
} | ||
yield [ | ||
@@ -25,0 +28,0 @@ takeEvery(({ type, payload }) => |
export const ROUTER_DID_CHANGE = '@@reduxReactRouter/routerDidChange'; | ||
export const SITE_ID_CHANGED = 'router/SITE_ID_CHANGED'; | ||
export const USER_ID_CHANGED = 'router/USER_ID_CHANGED'; | ||
export const IS_PREVIEW = 'router/IS_PREVIEW'; | ||
export const DEEP_URL_VISITED = 'router/DEEP_URL_VISITED'; |
Sorry, the diff of this file is not supported yet
93350
1306