import { useTheme } from "next-themes"; import { useAccount, useSwitchChain } from "wagmi"; import { ArrowsRightLeftIcon } from "@heroicons/react/24/solid"; import { getNetworkColor } from "~~/hooks/scaffold-eth"; import { getTargetNetworks } from "~~/utils/scaffold-eth"; const allowedNetworks = getTargetNetworks(); type NetworkOptionsProps = { hidden?: boolean; }; export const NetworkOptions = ({ hidden = false }: NetworkOptionsProps) => { const { switchChain } = useSwitchChain(); const { chain } = useAccount(); const { resolvedTheme } = useTheme(); const isDarkMode = resolvedTheme === "dark"; return ( <> {allowedNetworks .filter(allowedNetwork => allowedNetwork.id !== chain?.id) .map(allowedNetwork => (
  • ))} ); };