import { createThirdwebClient } from "thirdweb";
import { useNetworkSwitcherModal } from "thirdweb/react";
import { base, ethereum, polygon, sepolia, arbitrum } from "thirdweb/chains";
 
const client = createThirdwebClient({
 clientId: "<your_client_id>",
});
 
function Example() {
  const networkSwitcher = useNetworkSwitcherModal();
 
  function handleClick() {
     networkSwitcher.open({
       client,
       theme: 'light'
       sections: [
         { label: 'Recently used', chains: [arbitrum, polygon] },
         { label: 'Popular', chains: [base, ethereum, sepolia] },
       ]
    });
  }
 
  return <button onClick={handleClick}> Switch Network </button>
}