import { Spin } from "antd";
import { useTranslation } from "react-i18next";

const CollectionInfoCard = ({
  label,
  value,
  isLoading,
}: {
  label: string;
  value: string;
  isLoading?: boolean;
}) => {
  const { t } = useTranslation();
  return (
    <div className="collection_info_card">
      <h5>{t(`card.${label}`)}</h5>
      <p> {isLoading ? <Spin /> : t(value)}</p>
    </div>
  );
};

export default CollectionInfoCard;
