fix closing error/success message

This commit is contained in:
Martin Quarda 2024-10-08 09:48:40 +02:00
parent c3d1c51000
commit 9cd60d131e

View File

@ -40,7 +40,7 @@ class Main extends Component {
for(const [key, value] of searchParams){
if (key == "refId"){
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});
if(data.reason){
this.setState({
text: data.reason,
status_text: data.reason,
status: "failed",
})
} else {
this.setState({
text: data.success,
status_text: data.success,
status: "success",
})
if (data.redirect){
@ -100,7 +100,7 @@ class Main extends Component {
}).catch((error) => {
this.setState({
progress: false,
text: "Chyba: " + error.response.status +", " + error.response.data,
status_text: "Chyba: " + error.response.status +", " + error.response.data,
status: "failed",
})
});