import { LoadingIcon } from "@/components/LoadingIcon"; import { FC, memo } from "react"; import { WalletItemProps } from "../type"; import { cn } from "../utils"; type PropsType = { className?: string; wallet: WalletItemProps; handleClick: (item: WalletItemProps) => void; isLoading?: boolean; }; const WalletItem: FC = ({ className, wallet, handleClick, isLoading, }) => { const { icon, iconSrc, name, desc } = wallet; return (
handleClick(wallet)} >
{isLoading && ( )} {iconSrc ? ( ) : ( icon )}
{name} {desc}
); }; export default memo(WalletItem);