fix suggest

front
Gorji 4 years ago
parent 5d8b70920a
commit 93982e50aa
  1. 5
      src/views/ChatRoom/Body/Body.js
  2. 8
      src/views/ChatRoom/Body/ChatSuggest/ChatSuggest.js

@ -26,7 +26,10 @@ class Body extends Component {
document: null, document: null,
footer: 'suggest', footer: 'suggest',
suggest: [ suggest: [
[{ id: 0, text: 'سلام' }], [
{ id: 0, text: 'سلام' },
{ id: 0, text: 'سلام' },
],
[{ id: 1, text: 'وقت بخیر' }], [{ id: 1, text: 'وقت بخیر' }],
[{ id: 2, text: 'لطفا بامن تماس بگیر' }], [{ id: 2, text: 'لطفا بامن تماس بگیر' }],
[{ id: 3, text: 'متشکرم' }], [{ id: 3, text: 'متشکرم' }],

@ -16,15 +16,15 @@ export default function suggetbar({ suggest }) {
const Row = ({ row }) => { const Row = ({ row }) => {
return ( return (
<div className="chat-suggest__row d-flex"> <div className="chat-suggest__row d-flex">
<Suggest item={row[0]} /> {/* <Suggest item={row[0]} /> */}
{/* {row.map((item, i) => ( {row.map((item, i) => (
<Suggest item={item} key={i} /> <Suggest item={item} key={i} />
))} */} ))}
</div> </div>
); );
}; };
const Suggest = (item) => { const Suggest = ({ item }) => {
console.log(item.text); console.log(item.text);
return <div className="chat-suggest__row--item d-flex">{item.text}</div>; return <div className="chat-suggest__row--item d-flex">{item.text}</div>;
}; };

Loading…
Cancel
Save