PaymentId应该有一个值,它应该包含在链接标记中以生成正确的链接
export default class MkPayment extends React.Component {
constructor(props) {
super(props);
const query = queryString.parse(window.location.search);
this.state = {
paymentId: query.id,
payeeName: "",
},
};
render() {
return (
<Link className="border-button ml10" to={{ search: "?id=" + this.state.paymentId + "&retry=true" }}>Retry Payment</Link>
<p>{this.state.payeeName}</p>
);
}
}