react-logo/frontend/src/actions/message.actions.js

11 lines
294 B
JavaScript

export const ADD_MESSAGE = 'ADD_MESSAGE';
export function addMessage(type, text) {
return { type: ADD_MESSAGE, text, messageType: type };
}
export const REMOVE_OLDEST_MESSAGE = 'REMOVE_OLDEST_MESSAGE';
export function removeOldestMessage() {
return { type: REMOVE_OLDEST_MESSAGE };
}