+
+
+
setAmount(e.target.value)}
+ />
+
+ {!isUnstakeSelected ? (
+ `Balance: ${nearBalance} NEAR`
+ ) : (
+
+ Staked Balance: {stakedBalance} NEAR
+ {parseFloat(unstakedBalance) > 0 && (
+
+ Unstaked Balance: {unstakedBalance} NEAR
+ {allowedToWithdraw && (
+
+ )}
+
+ )}
+
+ )}
+
+
+ {!isUnstakeSelected &&
+ parseFloat(amount ?? "0") > parseFloat(nearBalance ?? "0") && (
+
+ Stake amount is more than your balance
+
+ )}
+ {isUnstakeSelected &&
+ parseFloat(amount ?? "0") > parseFloat(stakedBalance ?? "0") && (
+
+ Unstake amount is more than your staked balance
+
+ )}
+
+