Skip to content
Snippets Groups Projects
Commit 2ba74a80 authored by andmag's avatar andmag
Browse files

fixed bugs in re match feature

parent b956a859
No related branches found
No related tags found
1 merge request!67Resolve "Add re-match feature"
......@@ -35,8 +35,6 @@ export const toast500 = (statusCode) => {
let errorText = "";
console.log(statusCode);
switch(statusCode) {
case 401:
errorText = "Token has expired, please log out."; break;
......
......
......@@ -14,7 +14,7 @@ import {
KeyboardAvoidingView
} from "react-native";
import CustomDropDown from "../../components/CustomDropDown";
import { TextInput, HelperText, Button, RadioButton } from "react-native-paper";
import { TextInput, HelperText, Button, RadioButton, Colors } from "react-native-paper";
import { Divider } from "react-native-paper";
import ImageViewer from "react-native-image-zoom-viewer";
import {
......@@ -148,13 +148,12 @@ const _ChangeSalamanderScreen = (props) => {
APIKit.put("/editSalamander", bodyFormData)
.then(function (response) {
console.log("hello");
let locationValue = salamanderImageData.location;
updateSalamanderList({ setShowIndicator, locationValue });
setShowIndicator(false);
if (response.data.status === 200) {
//props.navigation.navigate("ManageSalamanders");
//toastSuccess("top", 2000, response.data.message);
if (response.data.matching === "Yes") {
if (response.data.matching === "Match!") {
setResponse({
responseMatch: response.data.matching,
id: response.data.id,
......@@ -162,7 +161,7 @@ const _ChangeSalamanderScreen = (props) => {
responseColor: Colors.green300,
});
setVisibleMatch(true);
} else if (response.data.matching === "No") {
} else if (response.data.matching === "No match.") {
setResponse({
responseMatch: response.data.matching,
id: response.data.id,
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment