Skip to content
Snippets Groups Projects
Commit 8b6c05b8 authored by Andrea Magnussen's avatar Andrea Magnussen
Browse files

Commented redux files

parent dde0e40f
No related branches found
No related tags found
1 merge request!69Resolve "Refactor app"
import React, { useState } from "react";
import DropDownPicker from "react-native-dropdown-picker";
import { View, Platform } from "react-native";
const CustomDropDown = (props) => {
const [value, setValue] = useState(props.defaultValue);
......
......@@ -144,6 +144,13 @@ export const onEditEmail = (props) => {
};
};
/**
* Updates the list of salamanders in manage salamanders after an action is performed
*
* @param {Bool} setShowIndicator handles the spinner logic
* @param {String} locationValue contains the value of the current location where the user is managing salamanders
* @returns async dispatch from redux
*/
export const updateSalamanderList = ({ setShowIndicator, locationValue }) => {
return async (dispatch) => {
try {
......@@ -166,6 +173,11 @@ export const updateSalamanderList = ({ setShowIndicator, locationValue }) => {
};
};
/**
* Removes the salamander list in memory when done with managing salamanders to reset the feature.
*
* @returns async dispatch from redux
*/
export const removeSalamanderList = (props) => {
return async (dispatch) => {
try {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment