From f470636a70943a8ecad8bddc791a1c2dddd28e1e Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Sat, 4 May 2019 21:13:12 +0300 Subject: Components -> UI --- vnext/src/components/Contacts.js | 49 ---------------------------------------- 1 file changed, 49 deletions(-) delete mode 100644 vnext/src/components/Contacts.js (limited to 'vnext/src/components/Contacts.js') diff --git a/vnext/src/components/Contacts.js b/vnext/src/components/Contacts.js deleted file mode 100644 index 3852b26f..00000000 --- a/vnext/src/components/Contacts.js +++ /dev/null @@ -1,49 +0,0 @@ -import React, { useEffect, useState } from 'react'; - -import { getChats } from '../api'; - - -import Contact from './Contact.js'; -import { ChatSpinner } from './Spinner'; - -export default function Contacts(props) { - const [pms, setPms] = useState([]); - useEffect(() => { - getChats() - .then(response => { - setPms(response.data.pms); - }); - }, []); - return ( -
-
- { - pms.length ? pms.map((chat) => - - ) : <> - } -
-
- ); -} - -const wrapperStyle = { - display: 'flex', - backgroundColor: '#fff' -}; - -const chatListStyle = { - display: 'flex', - flexDirection: 'column', - width: '100%', - padding: '12px' -}; - -const chatTitleStyle = { - width: '100%', - padding: '12px', - textAlign: 'left', - background: '#fff', - color: '#222', - borderBottom: '1px solid #eee' -}; -- cgit v1.2.3