Add disabled state to button if no compiled code
This commit is contained in:
@@ -364,14 +364,28 @@ const Accounts = () => {
|
|||||||
>
|
>
|
||||||
<Text>{account.name} </Text>
|
<Text>{account.name} </Text>
|
||||||
<Text css={{ color: "$mauve9" }}>
|
<Text css={{ color: "$mauve9" }}>
|
||||||
{account.address} ({account.xrp}) ({account.sequence})
|
{account.address} (
|
||||||
|
{Dinero({
|
||||||
|
amount: Number(account?.xrp || "0"),
|
||||||
|
precision: 6,
|
||||||
|
})
|
||||||
|
.toUnit()
|
||||||
|
.toLocaleString(undefined, {
|
||||||
|
style: "currency",
|
||||||
|
currency: "XRP",
|
||||||
|
currencyDisplay: "name",
|
||||||
|
})}
|
||||||
|
)
|
||||||
</Text>
|
</Text>
|
||||||
<Button
|
<Button
|
||||||
css={{ ml: "auto" }}
|
css={{ ml: "auto" }}
|
||||||
size="xs"
|
size="xs"
|
||||||
uppercase
|
uppercase
|
||||||
isLoading={account.isLoading}
|
isLoading={account.isLoading}
|
||||||
disabled={account.isLoading}
|
disabled={
|
||||||
|
account.isLoading ||
|
||||||
|
!snap.files.filter((file) => file.compiledWatContent).length
|
||||||
|
}
|
||||||
variant="secondary"
|
variant="secondary"
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
|
|||||||
Reference in New Issue
Block a user