import { T } from 'Components' import React, { useEffect, useMemo, useState } from 'react' import { useTranslation } from 'react-i18next' import Skeleton from 'react-loading-skeleton' import { Etablissement, fetchCompanyDetails } from '../api/sirene' export default function CompanyDetails({ siren, denomination }: Etablissement) { const { i18n } = useTranslation() const DateFormatter = useMemo( () => new Intl.DateTimeFormat(i18n.language, { month: 'short', day: 'numeric', year: 'numeric' }), [i18n.language] ) const [company, setCompany] = useState() useEffect(() => { fetchCompanyDetails(siren).then(setCompany) }, [siren]) return ( <>