{"size": 1630, "ext": "js", "max_stars_repo_path": "src/layouts/farming/MilkySwap/TableView/components/detailsBox.js", "max_stars_repo_name": "cryptoluxge/CryptoLux", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/layouts/farming/MilkySwap/TableView/components/detailsBox.js", "max_issues_repo_name": "cryptoluxge/CryptoLux", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/layouts/farming/MilkySwap/TableView/components/detailsBox.js", "max_forks_repo_name": "cryptoluxge/CryptoLux", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 36.2222222222, "max_line_length": 150, "alphanum_fraction": 0.6680981595}
import PropTypes from "prop-types";
import Link from "@mui/material/Link";
import Stack from "@mui/material/Stack";
import OpenInNewIcon from "@mui/icons-material/OpenInNew";
import SuiTypography from "components/SuiTypography";
import SuiBox from "components/SuiBox";
import LoadingAnimation from "components/LoadingAnimation";
import { explorerLink } from "utils/getExplorerUrls";
import { MilkySwapTextLogo } from "assets/images/Logos/Dapps";

function DetailsBox({ lpAddress, poolApr, tokenAddress, quoteTokenAddress, lpName }) {
  return (
    <SuiBox>
      <Stack spacing={0}>
        {Number(poolApr) > 0 ? (
          <SuiTypography fontSize={13} fontWeight="bold">
            APR: {poolApr.toLocaleString("en-US")}%
          </SuiTypography>
        ) : (
          <LoadingAnimation />
        )}
        <Link href={`https://www.milkyswap.exchange/add/${tokenAddress}/${quoteTokenAddress}`} target="_blank" underline="none" sx={{ fontSize: 14 }}>
          GET {lpName} <OpenInNewIcon />
        </Link>
        <Link href={explorerLink("wallet", lpAddress, 2001)} target="_blank" underline="none" sx={{ fontSize: 14 }}>
          კონტრაქტის ნახვა <OpenInNewIcon />
        </Link>
        <SuiBox sx={{ display: "flex", justifyContent: "center" }} mt={2}>
          <MilkySwapTextLogo />
        </SuiBox>
      </Stack>
    </SuiBox>
  );
}

DetailsBox.propTypes = {
  poolApr: PropTypes.number.isRequired,
  lpAddress: PropTypes.string.isRequired,
  lpName: PropTypes.string.isRequired,
  tokenAddress: PropTypes.string.isRequired,
  quoteTokenAddress: PropTypes.string.isRequired,
};

export default DetailsBox;
