import { useEffect, useState } from 'react'; import { Helmet } from 'react-helmet'; import { getChats } from '../api'; import Contact from './Contact.js'; import { ChatSpinner } from './Spinner'; /** * */ export default function Contacts() { const [pms, setPms] = useState([]); useEffect(() => { getChats() .then(response => { setPms(response.data.pms); }).catch(console.log); }, []); return (