fix closing error/success message
This commit is contained in:
parent
c3d1c51000
commit
9cd60d131e
@ -40,7 +40,7 @@ class Main extends Component {
|
|||||||
for(const [key, value] of searchParams){
|
for(const [key, value] of searchParams){
|
||||||
if (key == "refId"){
|
if (key == "refId"){
|
||||||
fetch(addr_prefix + "/api/payment_state?refId=" + value).then(resp => resp.json()).then(json =>{
|
fetch(addr_prefix + "/api/payment_state?refId=" + value).then(resp => resp.json()).then(json =>{
|
||||||
this.setState({status: json.status, text: json.reason})
|
this.setState({status: json.status, status_text: json.reason})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -85,12 +85,12 @@ class Main extends Component {
|
|||||||
this.setState({progress:false, uploadProgress: 1.0});
|
this.setState({progress:false, uploadProgress: 1.0});
|
||||||
if(data.reason){
|
if(data.reason){
|
||||||
this.setState({
|
this.setState({
|
||||||
text: data.reason,
|
status_text: data.reason,
|
||||||
status: "failed",
|
status: "failed",
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.setState({
|
this.setState({
|
||||||
text: data.success,
|
status_text: data.success,
|
||||||
status: "success",
|
status: "success",
|
||||||
})
|
})
|
||||||
if (data.redirect){
|
if (data.redirect){
|
||||||
@ -100,7 +100,7 @@ class Main extends Component {
|
|||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
this.setState({
|
this.setState({
|
||||||
progress: false,
|
progress: false,
|
||||||
text: "Chyba: " + error.response.status +", " + error.response.data,
|
status_text: "Chyba: " + error.response.status +", " + error.response.data,
|
||||||
status: "failed",
|
status: "failed",
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user