This feature is simple > we need a banner at the top of the page that informs visitors that they are connected to a testnet, whenever this is true.
Describe Preferred Solution
Preferred solution looks like ENS dApp banner (which can be found below) and preferred text is "You are viewing the ENS app on X" where X is the name of the network being used.
Describe Alternatives
Alternatives should be used only if it is taking too much time to do the description above.
One alternative is to position the banner at the footer.
Additional Context
To identify if a user is not in mainnet you can use Wagmi's useAccount hook and extract chain information from there!
At some point one conditional will be necessary: "is he / she in mainnet?"
To achieve this value, please try to use typed structs (e.g. chain === MainnetChain.name) instead of hardcoded values (e.g. chain === "mainnet")
Feature Request
Describe the Feature Request
This feature is simple > we need a banner at the top of the page that informs visitors that they are connected to a testnet, whenever this is true.
Describe Preferred Solution
Preferred solution looks like ENS dApp banner (which can be found below) and preferred text is "You are viewing the ENS app on X" where X is the name of the network being used.
Describe Alternatives
Alternatives should be used only if it is taking too much time to do the description above.
One alternative is to position the banner at the footer.
Additional Context
To identify if a user is not in mainnet you can use Wagmi's useAccount hook and extract chain information from there!
At some point one conditional will be necessary: "is he / she in mainnet?" To achieve this value, please try to use typed structs (e.g.
chain === MainnetChain.name
) instead of hardcoded values (e.g.chain === "mainnet"
)