import { Card, TableBody, TableCell, TableHead } from "@material-ui/core"; import ResponsiveTable from "@saleor/components/ResponsiveTable"; import Skeleton from "@saleor/components/Skeleton"; import TableRowLink from "@saleor/components/TableRowLink"; import { CountryListQuery } from "@saleor/graphql"; import { makeStyles } from "@saleor/macaw-ui"; import { countryTaxRatesUrl } from "@saleor/taxes/urls"; import classNames from "classnames"; import React from "react"; import { FormattedMessage } from "react-intl"; import { maybe, renderCollection } from "../../../misc"; const useStyles = makeStyles( { tableRow: { cursor: "pointer", }, textRight: { textAlign: "right", }, }, { name: "CountryList" }, ); interface CountryListProps { countries: CountryListQuery["shop"]["countries"]; } const CountryList: React.FC = props => { const { countries } = props; const classes = useStyles(props); return ( {renderCollection( countries, country => ( {maybe(() => country.code, )} {maybe(() => country.country, )} {maybe( () => country.vat.reducedRates.length, , )} ), () => ( ), )} ); }; CountryList.displayName = "CountryList"; export default CountryList;