Add checks for empty registryName in goBack
This commit is contained in:
@@ -62,7 +62,11 @@ const Multipage = () => {
|
||||
}, [fetchMultisig, multisigAddress]);
|
||||
|
||||
return (
|
||||
<Page goBack={{ pathname: `/${chain.registryName}`, title: "home" }}>
|
||||
<Page
|
||||
goBack={
|
||||
chain.registryName ? { pathname: `/${chain.registryName}`, title: "home" } : undefined
|
||||
}
|
||||
>
|
||||
<StackableContainer base>
|
||||
<StackableContainer>
|
||||
<label>Multisig Address</label>
|
||||
|
||||
@@ -146,10 +146,14 @@ const TransactionPage = ({
|
||||
|
||||
return (
|
||||
<Page
|
||||
goBack={{
|
||||
pathname: `/${chain.registryName}/${multisigAddress}`,
|
||||
title: "multisig",
|
||||
}}
|
||||
goBack={
|
||||
chain.registryName
|
||||
? {
|
||||
pathname: `/${chain.registryName}/${multisigAddress}`,
|
||||
title: "multisig",
|
||||
}
|
||||
: undefined
|
||||
}
|
||||
>
|
||||
<StackableContainer base>
|
||||
<StackableContainer>
|
||||
|
||||
@@ -39,11 +39,15 @@ const NewTransactionPage = () => {
|
||||
|
||||
return (
|
||||
<Page
|
||||
goBack={{
|
||||
pathname: `/${chain.registryName}/${multisigAddress}`,
|
||||
title: "multisig",
|
||||
needsConfirm: true,
|
||||
}}
|
||||
goBack={
|
||||
chain.registryName
|
||||
? {
|
||||
pathname: `/${chain.registryName}/${multisigAddress}`,
|
||||
title: "multisig",
|
||||
needsConfirm: true,
|
||||
}
|
||||
: undefined
|
||||
}
|
||||
>
|
||||
<StackableContainer base>
|
||||
{accountError || !accountOnChain ? (
|
||||
|
||||
@@ -6,7 +6,11 @@ export default function AccountPage() {
|
||||
const { chain } = useChains();
|
||||
|
||||
return (
|
||||
<Page goBack={{ pathname: `/${chain.registryName}`, title: "home" }}>
|
||||
<Page
|
||||
goBack={
|
||||
chain.registryName ? { pathname: `/${chain.registryName}`, title: "home" } : undefined
|
||||
}
|
||||
>
|
||||
<AccountView />
|
||||
</Page>
|
||||
);
|
||||
|
||||
@@ -7,7 +7,13 @@ export default function CreatePage() {
|
||||
const { chain } = useChains();
|
||||
|
||||
return (
|
||||
<Page goBack={{ pathname: `/${chain.registryName}`, title: "home", needsConfirm: true }}>
|
||||
<Page
|
||||
goBack={
|
||||
chain.registryName
|
||||
? { pathname: `/${chain.registryName}`, title: "home", needsConfirm: true }
|
||||
: undefined
|
||||
}
|
||||
>
|
||||
<StackableContainer base>
|
||||
<StackableContainer lessPadding>
|
||||
<h1 className="title">Create Legacy Multisig</h1>
|
||||
|
||||
Reference in New Issue
Block a user