Skip to content

Commit

Permalink
also filter in mobile component
Browse files Browse the repository at this point in the history
  • Loading branch information
eli-d committed Nov 19, 2024
1 parent b2d0398 commit 64b32e8
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion web/src/app/_layout/MobileNetworkSelection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,21 @@ import SPNTest from "@/assets/icons/spn-test.svg";
import ArrowDown from "@/assets/icons/arrow-down.svg";
import * as DropdownMenu from "@radix-ui/react-dropdown-menu";
import Ethereum from "@/assets/icons/ethereum.svg";
import appConfig from "@/config";
import { useChainId, useSwitchChain } from "wagmi";
import { superpositionMainnet } from "@/config/chains";
import { useFeatureFlag } from "@/hooks/useFeatureFlag";

/**
* Shows a dropdown menu with links to switch the network.
*/
export const MobileNetworkSelection = () => {
const { chains, switchChain } = useSwitchChain();
const showSuperpositionMainnet = useFeatureFlag("ui is mainnet enabled");
const { switchChain } = useSwitchChain();

const chains = appConfig.chains.allChains.filter(
(c) => !(c.id === superpositionMainnet.id && !showSuperpositionMainnet),
);

const chainId = useChainId();

Expand Down

0 comments on commit 64b32e8

Please sign in to comment.