Move multisig index to /chainName, tweak links

This commit is contained in:
abefernan
2023-12-01 16:06:21 +01:00
parent a45f060346
commit 48b3759873
3 changed files with 26 additions and 3 deletions
+2 -2
View File
@@ -95,8 +95,8 @@ export const getChain = (chains: ChainItems) => {
if (typeof window === "undefined") return emptyChain;
const rootRoute = location.pathname.split("/")[1];
// Avoid app from thinking the /create and /api routes are registryNames
const chainNameFromUrl = ["create", "api"].includes(rootRoute) ? "" : rootRoute;
// Avoid app from thinking the /api route is a registryName
const chainNameFromUrl = rootRoute === "api" ? "" : rootRoute;
const recentChain = getRecentChainFromStorage(chains);
if (!chainNameFromUrl && isChainInfoFilled(recentChain)) {
+1 -1
View File
@@ -62,7 +62,7 @@ const Multipage = () => {
}, [fetchMultisig, multisigAddress]);
return (
<Page goBack={{ pathname: "/", title: "home" }}>
<Page goBack={{ pathname: `/${chain.registryName}`, title: "home" }}>
<StackableContainer base>
<StackableContainer>
<label>Multisig Address</label>
+23
View File
@@ -0,0 +1,23 @@
import FindMultisigForm from "@/components/forms/FindMultisigForm";
import Page from "@/components/layout/Page";
import StackableContainer from "@/components/layout/StackableContainer";
import { useChains } from "@/context/ChainsContext";
const MultiPage = () => {
const { chain } = useChains();
return (
<Page>
<StackableContainer base>
<StackableContainer lessPadding>
<h1 className="title">
<span>{chain.chainDisplayName}</span> Multisig Manager
</h1>
</StackableContainer>
<FindMultisigForm />
</StackableContainer>
</Page>
);
};
export default MultiPage;