Files
tom goriunovandGitHub 25a4c2a97e Replace OP Superchain feature with generic Multichain explorer (#3299)
* rename feature

* rename evn preset

* types, mocks and stubs renaming

* rename UI components
2026-02-25 18:02:52 +01:00

17 lines
471 B
TypeScript

import { useRouter } from 'next/router';
import React from 'react';
import getQueryParamString from 'lib/router/getQueryParamString';
interface Props {
chainIds: Array<string>;
}
export default function useChainSelectErc20({ chainIds }: Props) {
const router = useRouter();
const chainId = getQueryParamString(router.query.chain_id);
return React.useState<Array<string> | undefined>(
chainId && chainIds.includes(chainId) ? [ chainId ] : [ 'all' ],
);
}