Skip to content
Snippets Groups Projects
Commit 0265a864 authored by Evelyn Eastmond's avatar Evelyn Eastmond
Browse files

Adding jsdocs to the alert reducers.

parent 21a9afb5
No related branches found
No related tags found
No related merge requests found
......@@ -43,6 +43,12 @@ const reducer = function (state, action) {
}
};
/**
* Function to close an alert with the given index.
*
* @param {object} index - the index of the alert to close.
* @return {object} - an object to be passed to the reducer.
*/
const closeAlert = function (index) {
return {
type: CLOSE_ALERT,
......@@ -50,6 +56,12 @@ const closeAlert = function (index) {
};
};
/**
* Function to show an alert with the given input data.
*
* @param {object} data - data with the following props: {message, extensionId=null}
* @return {object} - an object to be passed to the reducer.
*/
const showAlert = function (data) {
return {
type: SHOW_ALERT,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment