Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade nextjs and other packages #6

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x]
node-version: [12.x]
steps:
- uses: actions/checkout@v1

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# next.js
/.next/
/out/
.idea

# production
/build
Expand Down
9 changes: 7 additions & 2 deletions app/configureStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import { createStore, applyMiddleware, compose } from 'redux';
import createSagaMiddleware from 'redux-saga';
import { createWrapper } from 'next-redux-wrapper';
import { createInjectorsEnhancer } from 'redux-injectors';

import createReducer from './reducers';

Expand Down Expand Up @@ -36,9 +37,13 @@ export default function configureStore(initialState = {}) {
const middlewares = [sagaMiddleware];

const enhancers = [applyMiddleware(...middlewares)];
const runSaga = sagaMiddleware.run;
const injectEnhancer = createInjectorsEnhancer({
createReducer,
runSaga
});

const store = createStore(createReducer(), initialState, composeEnhancers(...enhancers));

const store = createStore(createReducer(), initialState, composeEnhancers(...enhancers, injectEnhancer));
// Extensions
store.runSaga = sagaMiddleware.run;
store.injectedReducers = {}; // Reducer registry
Expand Down
5 changes: 3 additions & 2 deletions app/reducers.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@

import { combineReducers } from 'redux';

import { appReducer } from './store/reducers/app';
import { appReducer } from '@store/reducers/app';

export default function createReducer() {
export default function createReducer(injectedReducer = {}) {
const rootReducer = combineReducers({
...injectedReducer,
app: appReducer
});

Expand Down
58 changes: 0 additions & 58 deletions app/utils/injectSaga.js

This file was deleted.

85 changes: 0 additions & 85 deletions app/utils/sagaInjectors.js

This file was deleted.

129 changes: 0 additions & 129 deletions app/utils/tests/injectSaga.test.js

This file was deleted.

Loading