import { XMarkIcon } from "@heroicons/react/24/outline"; import getAccount from "@hey/helpers/getAccount"; import { useAccountsBulkQuery } from "@hey/indexer"; import { memo } from "react"; import { useNavigate } from "react-router"; import SingleAccount from "@/components/Shared/Account/SingleAccount"; import Loader from "@/components/Shared/Loader"; import { H6 } from "@/components/Shared/UI"; import stopEventPropagation from "@/helpers/stopEventPropagation"; import { useAccountLinkStore } from "@/store/non-persisted/navigation/useAccountLinkStore"; import { useSearchStore } from "@/store/persisted/useSearchStore"; interface RecentAccountsProps { onAccountClick: () => void; } const RecentAccounts = ({ onAccountClick }: RecentAccountsProps) => { const navigate = useNavigate(); const { addAccount, clearAccount, clearAccounts, accounts: recentAccounts } = useSearchStore(); const { setCachedAccount } = useAccountLinkStore(); const { data, loading } = useAccountsBulkQuery({ skip: !recentAccounts.length, variables: { request: { addresses: recentAccounts } } }); if (!recentAccounts.length) { return null; } const accounts = data?.accountsBulk || []; return (