fixed showpage SSR to use proper Saga and Action
This commit is contained in:
parent
3d56655efe
commit
da6fe2dc1d
2 changed files with 4207 additions and 6 deletions
4204
index.js
4204
index.js
File diff suppressed because one or more lines are too long
|
@ -16,11 +16,7 @@ import { Reducers, GAListener, App, Sagas, Actions } from 'spee.ch-components';
|
|||
*/
|
||||
import Helmet from 'react-helmet';
|
||||
|
||||
// configure the reducers by passing initial state configs
|
||||
const siteConfig = require('siteConfig.js');
|
||||
const MyReducers = Reducers(siteConfig);
|
||||
const MyApp = App(siteConfig);
|
||||
const MyGAListener = GAListener(siteConfig);
|
||||
|
||||
const returnSagaWithParams = (saga, params) => {
|
||||
return function * () {
|
||||
|
@ -31,6 +27,11 @@ const returnSagaWithParams = (saga, params) => {
|
|||
module.exports = (req, res) => {
|
||||
let context = {};
|
||||
|
||||
// configure the reducers by passing initial state configs
|
||||
const MyReducers = Reducers(siteConfig);
|
||||
const MyApp = App(siteConfig);
|
||||
const MyGAListener = GAListener(siteConfig);
|
||||
|
||||
// create and apply middleware
|
||||
const sagaMiddleware = createSagaMiddleware();
|
||||
const middleware = applyMiddleware(sagaMiddleware);
|
||||
|
|
Loading…
Reference in a new issue