Fix claim rewards refresh bug

This commit is contained in:
Reckless_Satoshi 2022-05-22 13:56:07 -07:00
parent bf35961efb
commit 4bbb885ec6
No known key found for this signature in database
GPG Key ID: 9C4585B561315571
5 changed files with 12 additions and 10 deletions

View File

@ -90,7 +90,7 @@ class BottomBar extends Component {
this.setState({openProfile: false});
};
handleSubmitInvoiceClicked=(rewardInvoice)=>{
handleSubmitInvoiceClicked=(e, rewardInvoice)=>{
this.setState({
badInvoice:false,
showRewardsSpinner: true,
@ -112,6 +112,7 @@ class BottomBar extends Component {
withdrawn: data.successful_withdrawal ? true : false,
showRewardsSpinner: false,
}));
e.preventDefault();
}
getHost(){

View File

@ -41,7 +41,7 @@ type Props = {
activeOrderId: string | number;
lastOrderId: string | number;
referralCode: string;
handleSubmitInvoiceClicked: (invoice: string) => void;
handleSubmitInvoiceClicked: (e:any, invoice: string) => void;
host: string;
showRewardsSpinner: boolean;
withdrawn: boolean;
@ -273,9 +273,9 @@ const ProfileDialog = ({
</Grid>
</ListItemText>
) : (
<form style={{maxWidth: 270}}>
<Grid container alignItems="stretch" style={{ display: "flex"}}>
<Grid item style={{ display: "flex" }}>
<form noValidate style={{maxWidth: 270}}>
<Grid container style={{ display: "flex", alignItems: "stretch"}}>
<Grid item style={{ display: "flex", maxWidth:160}} >
<TextField
error={badInvoice ? true : false}
helperText={badInvoice ? badInvoice : "" }
@ -288,13 +288,14 @@ const ProfileDialog = ({
/>
</Grid>
<Grid item alignItems="stretch" style={{ display: "flex" }}>
<Grid item alignItems="stretch" style={{ display: "flex", maxWidth:80}}>
<Button
sx={{maxHeight:38}}
onClick={() => handleSubmitInvoiceClicked(rewardInvoice)}
onClick={(e) => handleSubmitInvoiceClicked(e, rewardInvoice)}
variant="contained"
color="primary"
size="small"
type="submit"
>
{t("Submit")}
</Button>

View File

@ -3,7 +3,7 @@ export { default as InfoDialog } from "./Info";
export { default as LearnDialog } from "./Learn";
export { default as NoRobotDialog } from "./NoRobot";
export { default as StoreTokenDialog } from "./StoreToken";
export { default as ExchangeSummaryDialog } from "./ExchangeSummaryDialog";
export { default as ProfileDialog } from "./ProfileDialog";
export { default as StatsDialog } from "./StatsDialog";
export { default as ExchangeSummaryDialog } from "./ExchangeSummary";
export { default as ProfileDialog } from "./Profile";
export { default as StatsDialog } from "./Stats";