mirador
Version:
An open-source, web-based 'multi-up' viewer that supports zoom-pan-rotate functionality, ability to display/compare simple images, and images with annotations.
25 lines (23 loc) • 438 B
JavaScript
import { v4 as uuid } from 'uuid';
import ActionTypes from './action-types';
/**
* addError - action creator
* @param {string} error
*/
export function addError(error) {
return {
id: "error-".concat(uuid()),
message: error,
type: ActionTypes.ADD_ERROR
};
}
/**
* removeError - action creator
* @param {string} id
*/
export function removeError(id) {
return {
id: id,
type: ActionTypes.REMOVE_ERROR
};
}