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,
footer: 'suggest',
suggest: [
[{ id: 0, text: 'سلام' }],
[
{ id: 0, text: 'سلام' },
{ id: 0, text: 'سلام' },
],
[{ id: 1, text: 'وقت بخیر' }],
[{ id: 2, text: 'لطفا بامن تماس بگیر' }],
[{ id: 3, text: 'متشکرم' }],

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

Loading…
Cancel
Save