Skip to content

Fix problem with sagas and storybook #65

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
3 changes: 2 additions & 1 deletion template.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@formatjs/intl-pluralrules": "^3.5.1",
"@loadable/component": "^5.14.1",
"@reduxjs/toolkit": "^1.2.1",
"@storybook/addon-essentials": "^6.0.27",
"@storybook/addon-essentials": "6.0.27",
"@storybook/preset-create-react-app": "3.1.4",
"@storybook/react": "6.0.27",
"@testing-library/dom": "^7.26.3",
Expand All @@ -38,6 +38,7 @@
"@types/ua-parser-js": "^0.7.33",
"axios": "^0.18.0",
"axios-case-converter": "^0.6.0",
"babel-loader": "8.2.0",
"core-js": "^3.6.2",
"es5-shim": "^4.5.12",
"eslint-config-prettier": "^6.15.0",
Expand Down
3 changes: 3 additions & 0 deletions template/.storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
module.exports = {
stories: ['../src/**/*.stories.tsx'],
addons: ['@storybook/preset-create-react-app', '@storybook/addon-essentials'],
typescript: {
reactDocgen: 'none',
}
};
1 change: 1 addition & 0 deletions template/public/user.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
"id": 1,
"login": "user1",
"name": "User One",
"displayName": "One",
"email": "[email protected]"
}
3 changes: 3 additions & 0 deletions template/public/users.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,21 @@
"id": 1,
"login": "user1",
"name": "User One",
"displayName": "One",
"email": "[email protected]"
},
{
"id": 2,
"login": "user2",
"name": "User Two",
"displayName": "Two",
"email": "[email protected]"
},
{
"id": 3,
"login": "user3",
"name": "User Three",
"displayName": "Three",
"email": "[email protected]"
}
]
2 changes: 1 addition & 1 deletion template/src/modules/users/users.sagas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { User } from './users.types';

function* fetchUsers(action: PromiseAction<void, User[]>) {
try {
const data = yield users.list();
const data: User[] = yield users.list();
yield resolvePromiseAction(action, data);
} catch (error) {
reportError(error);
Expand Down
104 changes: 0 additions & 104 deletions yarn.lock

This file was deleted.