Skip to content

Commit

Permalink
update: show error message if budget is less than bounty amount
Browse files Browse the repository at this point in the history
  • Loading branch information
tobi-bams committed Nov 20, 2023
1 parent 1d1d956 commit 818a8f1
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,14 @@ function MobileView(props: CodingBountiesProps) {

await main.makeBountyPayment(body);
} else {
generateInvoice(price || 0);
return setToasts([
{
id: `${Math.random()}`,
title: 'Insufficient funds in the organization.',
color: 'danger',
toastLifeTimeMs: 10000
}
]);
}
} else {
generateInvoice(price || 0);
Expand Down Expand Up @@ -1210,6 +1217,7 @@ function MobileView(props: CodingBountiesProps) {
</AssigneeProfile>
</NormalUser>
)}
<EuiGlobalToastList dismissToast={removeToast} toastLifeTimeMs={6000} />
<EuiGlobalToastList toasts={toasts} dismissToast={removeToast} toastLifeTimeMs={6000} />
</div>
);
Expand Down

0 comments on commit 818a8f1

Please sign in to comment.