import { useChain } from '@0xsequence/connect'
function App() {
// Get current chain configuration
const currentChain = useChain()
// Get configuration for a specific chain (e.g., Ethereum Mainnet)
const ethereumChain = useChain(1)
return (
<div>
<h2>Current Chain</h2>
{currentChain && (
<div>
<p>Name: {currentChain.name}</p>
<p>Chain ID: {currentChain.id}</p>
<p>Network: {currentChain.network}</p>
<p>Native Currency: {currentChain.nativeCurrency.symbol}</p>
</div>
)}
<h2>Ethereum Mainnet</h2>
{ethereumChain && (
<div>
<p>Name: {ethereumChain.name}</p>
<p>Chain ID: {ethereumChain.id}</p>
<p>Network: {ethereumChain.network}</p>
<p>Native Currency: {ethereumChain.nativeCurrency.symbol}</p>
</div>
)}
</div>
)
}