Total Complexity | 2 |
Complexity/F | 1 |
Lines of Code | 16 |
Function Count | 2 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | import { fromJS } from 'immutable'; |
||
2 | import { generateLastUpdate } from './../../../util/lastUpdate'; |
||
3 | |||
4 | export const errorOccurred = (state, { error, stateKey }) => |
||
5 | state.setIn([stateKey], fromJS({ |
||
6 | error: error, |
||
7 | errorOccurred: true, |
||
8 | lastUpdate: generateLastUpdate() |
||
9 | })); |
||
10 | |||
11 | export const dismissError = (state, { stateKey }) => |
||
12 | state.setIn([stateKey], fromJS({ |
||
13 | error: '', |
||
14 | errorOccurred: false, |
||
15 | lastUpdate: generateLastUpdate() |
||
16 | })); |
||
17 |