File tree Expand file tree Collapse file tree 3 files changed +2
-20
lines changed
todos-typesafe/__snapshots__ Expand file tree Collapse file tree 3 files changed +2
-20
lines changed Original file line number Diff line number Diff line change 1
1
// Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
3
- exports [` Todos Logic initial state should match a snapshot 1` ] = `
3
+ exports [` Todos Stories initial state should match a snapshot 1` ] = `
4
4
Object {
5
- " errorMessage" : " " ,
6
- " isFetching" : false ,
7
5
" todos" : Array [],
8
6
" todosFilter" : " " ,
9
7
}
Original file line number Diff line number Diff line change 1
1
// Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
3
- exports [` Todos Logic initial state should match a snapshot 1` ] = `
3
+ exports [` Todos Stories initial state should match a snapshot 1` ] = `
4
4
Object {
5
- " errorMessage" : " " ,
6
- " isFetching" : false ,
7
5
" todos" : Array [],
8
6
" todosFilter" : " " ,
9
7
}
Original file line number Diff line number Diff line change @@ -6,27 +6,13 @@ import * as actions from './actions';
6
6
import { ADD , CHANGE_FILTER , TOGGLE } from './constants' ;
7
7
8
8
export type TodosState = {
9
- readonly isFetching : boolean ;
10
- readonly errorMessage : string | null ;
11
9
readonly todos : Todo [ ] ;
12
10
readonly todosFilter : TodosFilter ;
13
11
} ;
14
12
15
13
export type TodosAction = ActionType < typeof actions > ;
16
14
17
15
export default combineReducers < TodosState , TodosAction > ( {
18
- isFetching : ( state = false , action ) => {
19
- switch ( action . type ) {
20
- default :
21
- return state ;
22
- }
23
- } ,
24
- errorMessage : ( state = null , action ) => {
25
- switch ( action . type ) {
26
- default :
27
- return state ;
28
- }
29
- } ,
30
16
todos : ( state = [ ] , action ) => {
31
17
switch ( action . type ) {
32
18
case ADD :
You can’t perform that action at this time.
0 commit comments