Add conditional rendering for null accountOnChain
This commit is contained in:
@@ -111,35 +111,35 @@ const Multipage = () => {
|
||||
</div>
|
||||
</StackableContainer>
|
||||
)}
|
||||
{txView === "send" && (
|
||||
{txView === "send" && accountOnChain && (
|
||||
<TransactionForm
|
||||
address={multisigAddress}
|
||||
accountOnChain={accountOnChain}
|
||||
closeForm={closeForm}
|
||||
/>
|
||||
)}
|
||||
{txView === "delegate" && (
|
||||
{txView === "delegate" && accountOnChain && (
|
||||
<DelegationForm
|
||||
delegatorAddress={multisigAddress}
|
||||
accountOnChain={accountOnChain}
|
||||
closeForm={closeForm}
|
||||
/>
|
||||
)}
|
||||
{txView === "undelegate" && (
|
||||
{txView === "undelegate" && accountOnChain && (
|
||||
<UnDelegationForm
|
||||
delegatorAddress={multisigAddress}
|
||||
accountOnChain={accountOnChain}
|
||||
closeForm={closeForm}
|
||||
/>
|
||||
)}
|
||||
{txView === "redelegate" && (
|
||||
{txView === "redelegate" && accountOnChain && (
|
||||
<ReDelegationForm
|
||||
delegatorAddress={multisigAddress}
|
||||
accountOnChain={accountOnChain}
|
||||
closeForm={closeForm}
|
||||
/>
|
||||
)}
|
||||
{txView === "claimRewards" && (
|
||||
{txView === "claimRewards" && accountOnChain && (
|
||||
<RewardsForm
|
||||
delegatorAddress={multisigAddress}
|
||||
accountOnChain={accountOnChain}
|
||||
@@ -158,36 +158,44 @@ const Multipage = () => {
|
||||
Once a transaction is created, it can be signed by the multisig members, and then
|
||||
broadcast.
|
||||
</p>
|
||||
<Button
|
||||
label="Create Transaction"
|
||||
onClick={() => {
|
||||
setTxView("send");
|
||||
}}
|
||||
/>
|
||||
<Button
|
||||
label="Create Delegation"
|
||||
onClick={() => {
|
||||
setTxView("delegate");
|
||||
}}
|
||||
/>
|
||||
<Button
|
||||
label="Create UnDelegation"
|
||||
onClick={() => {
|
||||
setTxView("undelegate");
|
||||
}}
|
||||
/>
|
||||
<Button
|
||||
label="Create Redelegate"
|
||||
onClick={() => {
|
||||
setTxView("redelegate");
|
||||
}}
|
||||
/>
|
||||
<Button
|
||||
label="Claim Rewards"
|
||||
onClick={() => {
|
||||
setTxView("claimRewards");
|
||||
}}
|
||||
/>
|
||||
{accountOnChain ? (
|
||||
<>
|
||||
<Button
|
||||
label="Create Transaction"
|
||||
onClick={() => {
|
||||
setTxView("send");
|
||||
}}
|
||||
/>
|
||||
<Button
|
||||
label="Create Delegation"
|
||||
onClick={() => {
|
||||
setTxView("delegate");
|
||||
}}
|
||||
/>
|
||||
<Button
|
||||
label="Create UnDelegation"
|
||||
onClick={() => {
|
||||
setTxView("undelegate");
|
||||
}}
|
||||
/>
|
||||
<Button
|
||||
label="Create Redelegate"
|
||||
onClick={() => {
|
||||
setTxView("redelegate");
|
||||
}}
|
||||
/>
|
||||
<Button
|
||||
label="Claim Rewards"
|
||||
onClick={() => {
|
||||
setTxView("claimRewards");
|
||||
}}
|
||||
/>
|
||||
</>
|
||||
) : (
|
||||
<p>
|
||||
An account needs to be present on the multisig before creating a transaction.
|
||||
</p>
|
||||
)}
|
||||
</StackableContainer>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user