Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
action.payload.json.messages.forEach(m => {
nextState.push({
id: uuid(),
message: `${m.field}: ${m.message}`,
severity: 'danger',
timeToLive: 0,
});
});
}
* This source code is licensed under the GPLv3 license found in the
* LICENSE file in the root directory of this source tree.
*
*/
import { handleActions } from 'redux-actions';
import { uuid } from '@ndla/util';
export default handleActions(
{
SET_STATE_UUID: {
next: (state, action) => action.payload,
throw: state => state,
},
},
uuid(),
);