import Typography from "@material-ui/core/Typography"; import React from "react"; import Skeleton from "../Skeleton"; export interface AddressType { id: string; city: string; cityArea?: string; companyName?: string; country: { code: string; country: string; }; countryArea?: string; firstName: string; lastName: string; phone: string; postalCode: string; streetAddress1: string; streetAddress2?: string; } export interface AddressProps { address: AddressType; } const Address: React.FC = ({ address }) => { if (!address) { return ; } return (
{address.firstName} {address.lastName} {address.companyName && ( {address.companyName} )} {address.streetAddress1}
{address.streetAddress2}
{" "} {address.postalCode} {address.city} {address.cityArea ? ", " + address.cityArea : ""} {address.countryArea ? address.countryArea + ", " + address.country.country : address.country.country}
); }; Address.displayName = "Address"; export default Address;