Add checks for empty registryName in goBack

This commit is contained in:
abefernan
2024-01-29 09:19:55 +01:00
parent 678aef8632
commit 7e327ad407
5 changed files with 34 additions and 12 deletions
+5 -1
View File
@@ -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 ? (
+5 -1
View File
@@ -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 -1
View File
@@ -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>