Skip to content

Commit a7d30b8

Browse files
committed
Add addView to state
1 parent f4c10fa commit a7d30b8

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/state/index.js

+10-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ const initialState = {
44
user: {
55
view: 'families',
66
family: null,
7-
category: null
7+
category: null,
8+
item: null
89
},
910
menu: {}
1011
};
@@ -56,6 +57,14 @@ export const changeView = (view, selection) => {
5657
category: selection
5758
}
5859
};
60+
case 'add':
61+
return {
62+
type: 'CHANGE_VIEW',
63+
data: {
64+
view,
65+
item: selection
66+
}
67+
};
5968
default:
6069
break;
6170
}

0 commit comments

Comments
 (0)