|
@@ -10,8 +10,7 @@ import { firstLetter,slicedWord,timeStamp } from '../../../../../helpers'
|
|
|
|
|
|
const Credentials = () => {
|
|
const Credentials = () => {
|
|
const dispatch = useDispatch()
|
|
const dispatch = useDispatch()
|
|
- const chat = useSelector(getChat)
|
|
|
|
- const { name,lastName,avatarUrl,color,updatedAt } = chat
|
|
|
|
|
|
+ const { name, lastName, avatarUrl, color, online } = useSelector(getChat)
|
|
return (
|
|
return (
|
|
<ListItemButton onClick={() => dispatch(actionIsOpen('credentials'))}>
|
|
<ListItemButton onClick={() => dispatch(actionIsOpen('credentials'))}>
|
|
<ListItemIcon >
|
|
<ListItemIcon >
|
|
@@ -22,7 +21,7 @@ const Credentials = () => {
|
|
</ListItemIcon>
|
|
</ListItemIcon>
|
|
<ListItemText primary={`${firstLetter(name)}${slicedWord(name, 15, 1)}
|
|
<ListItemText primary={`${firstLetter(name)}${slicedWord(name, 15, 1)}
|
|
${firstLetter(lastName)}${slicedWord(lastName, 15, 1)}`}
|
|
${firstLetter(lastName)}${slicedWord(lastName, 15, 1)}`}
|
|
- secondary={`last seen ${timeStamp(updatedAt)}`} />
|
|
|
|
|
|
+ secondaryTypographyProps={{ color: '#0379af' }} secondary={online === 'true'?'online':`last seen ${timeStamp(online)}`} />
|
|
</ListItemButton>
|
|
</ListItemButton>
|
|
)
|
|
)
|
|
}
|
|
}
|