import { useMemo, useState } from "react"; import { WalletItemProps } from "../type"; import { Empty, Footer, WalletList } from "./WalletSelector"; import InputSearch from "./InputSearch"; interface IProps { walletOptions?: WalletItemProps[]; onClickWalletItem: (wallet: WalletItemProps, index: number) => void; connected?: boolean; loadingIconKey?: string; } const ConnectWalletMain = ({ walletOptions = [], onClickWalletItem, loadingIconKey }: IProps) => { const [keyWord, setKeyWord] = useState(""); const filterWalletList = useMemo( () => walletOptions.filter((item) => item.name.toLowerCase().startsWith(keyWord.toLowerCase())), [walletOptions, keyWord], ); const handleWalletSelect = (wallet: WalletItemProps, index: number) => { onClickWalletItem?.(wallet, index); }; return (