-
-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
type: enhancementNew feature or requestNew feature or request
Description
From browse route:
useEffect(() => {
if (!params.chain) {
navigate("/" + Object.keys(networkMap)[0] + "/");
} else if (networkMap[params.chain]?.contractInstances && ethereumContext?.chainId != params.chain) {
ethereumContext?.changeNetwork(params.chain);
}
});
From router logic:
<Route path=":chain/report/"element={networkMap?.[value.chainId]?.contractInstances || !value.chainId ? <Create /> : <EthereumProviderErrors />}/>
From navigation:
const links = [{name:"Front Page", to: `${ethereumContext?.chainId || Object.keys(networkMap)[0]}/`},
{name:"Report", to: `${ethereumContext?.chainId || Object.keys(networkMap)[0]}/report`},
{name:"Account", to: `${ethereumContext?.chainId || Object.keys(networkMap)[0]}/account`},
{name:"F.A.Q.", to: `faq/`},
{name:"About", to: `about/`}];
There are too many hacks and the solutions seem far from intuitive. Simplify routing logic to reduce complexity and prevent potential bugs.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
type: enhancementNew feature or requestNew feature or request
Type
Projects
Status
Done