aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/components/Contacts.js
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-12-07 14:36:45 +0300
committerGravatar Vitaly Takmazov2023-01-13 10:37:54 +0300
commit477b6deb29bf5ea6dd6adba62205cd10fcf9c36d (patch)
tree6b7c31195febe0d108b26ada1d9d443aa8eee894 /vnext/src/components/Contacts.js
parent6ecedec4983b00674089d07b55122b545d017688 (diff)
Chat spinner and styling
Diffstat (limited to 'vnext/src/components/Contacts.js')
-rw-r--r--vnext/src/components/Contacts.js24
1 files changed, 9 insertions, 15 deletions
diff --git a/vnext/src/components/Contacts.js b/vnext/src/components/Contacts.js
index 84a6ec9f..bdbc5a01 100644
--- a/vnext/src/components/Contacts.js
+++ b/vnext/src/components/Contacts.js
@@ -4,6 +4,7 @@ import { getChats } from '../api';
import Contact from './Contact.js';
+import { ChatSpinner } from './Spinner';
export default class Contacts extends React.Component {
constructor(props) {
@@ -28,17 +29,13 @@ export default class Contacts extends React.Component {
render() {
const { pms } = this.state;
return (
- <div className="msgs">
- <div style={wrapperStyle} className="msg-cont">
- <ul style={chatListStyle}>
- {
- pms && pms.map((chat) =>
- <li key={chat.uname} style={chatTitleStyle}>
- <Contact key={chat.uname} user={chat} />
- </li>
- )
- }
- </ul>
+ <div className="msg-cont">
+ <div style={chatListStyle}>
+ {
+ pms.length ? pms.map((chat) =>
+ <Contact key={chat.uname} user={chat} style={chatTitleStyle} />
+ ) : <><ChatSpinner /><ChatSpinner /><ChatSpinner /><ChatSpinner /><ChatSpinner /></>
+ }
</div>
</div>
);
@@ -51,17 +48,14 @@ const wrapperStyle = {
};
const chatListStyle = {
- boxSizing: 'border-box',
- padding: '0 20px',
display: 'flex',
- alignItems: 'center',
flexDirection: 'column',
width: '100%'
};
const chatTitleStyle = {
width: '100%',
- padding: '3px 6px',
+ padding: '12px',
textAlign: 'left',
background: '#fff',
color: '#222',