You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.2 KiB
44 lines
1.2 KiB
import React, { Component } from 'react'; |
|
import Chat from './Chat/Chat'; |
|
|
|
import photo from '../../../../assets/images/reza.png'; |
|
import pencil from '../../../../assets/icons/pencil.svg'; |
|
import logo from '../../../../assets/icons/logo.svg'; |
|
import './ChatList.scss'; |
|
export default class ChatList extends Component { |
|
constructor(props) { |
|
super(props); |
|
this.state = { |
|
chats : [ |
|
{ |
|
id : 0, |
|
name : 'داستان نمونه', |
|
lastMessage : 'نمونه اولیه داستان ایما', |
|
imageUrl : logo, |
|
badge : "جدید" |
|
}, |
|
{ |
|
id : 0, |
|
name : 'نمونه امکانات', |
|
lastMessage : 'نمونه امکانات داستان ایما', |
|
imageUrl : logo, |
|
badge : "تست" |
|
}, |
|
], |
|
} |
|
} |
|
render(){ |
|
return ( |
|
<div className="chat-list d-flex flex-column"> |
|
{ |
|
this.state.chats.map(item => ( |
|
<Chat key={item.id} data={item} /> |
|
)) |
|
} |
|
<div className="chat-list__float d-flex" style={{filter:"grayscale(2)"}}> |
|
<img src={pencil} alt=""/> |
|
</div> |
|
</div> |
|
); |
|
} |
|
} |