spee.ch/react/actions/index.js

27 lines
467 B
JavaScript
Raw Normal View History

2018-01-09 02:06:31 +01:00
// export action types
export const FILE_SELECTED = 'FILE_SELECTED';
export const FILE_CLEAR = 'FILE_CLEAR';
export const METADATA_UPDATE = 'TITLE_UPDATE';
2018-01-09 02:06:31 +01:00
// export action creators
export function selectFile (file) {
return {
type: FILE_SELECTED,
file: file,
2018-01-09 02:06:31 +01:00
};
};
export function clearFile () {
return {
type: FILE_CLEAR,
};
};
export function updateMetadata (name, value) {
return {
type: METADATA_UPDATE,
name,
value,
};
};