83b077450a
* showing Autosave enabled toast * fixed variable names * fixed constant name typo
23 lines
412 B
JavaScript
23 lines
412 B
JavaScript
import * as ActionTypes from '../../../constants';
|
|
|
|
export function hideToast() {
|
|
return {
|
|
type: ActionTypes.HIDE_TOAST
|
|
};
|
|
}
|
|
|
|
export function showToast(time) {
|
|
return (dispatch) => {
|
|
dispatch({
|
|
type: ActionTypes.SHOW_TOAST
|
|
});
|
|
setTimeout(() => dispatch(hideToast()), time);
|
|
};
|
|
}
|
|
|
|
export function setToastText(text) {
|
|
return {
|
|
type: ActionTypes.SET_TOAST_TEXT,
|
|
text
|
|
};
|
|
}
|