reza added somethins

front
Reza_ashrafi 4 years ago
parent d4e990a5db
commit 36afd8c740
  1. 23
      src/views/ChatRoom/Body/ChatSuggest/ChatSuggest.js

@ -7,8 +7,8 @@ export default class ChatSuggest extends Component {
return ( return (
<div className="chat-suggest portrait-slider d-flex flex-column"> <div className="chat-suggest portrait-slider d-flex flex-column">
<Carousel itemsToShow={1} isRTL={true} enableTilt={true} showArrows={false}> <Carousel itemsToShow={1} isRTL={true} enableTilt={true} showArrows={false}>
{suggest.map((item, i) => ( {suggest.map((row, i) => (
<Suggest item={item} key={i} /> <Row row={row} key={i} />
))} ))}
</Carousel> </Carousel>
</div> </div>
@ -16,9 +16,16 @@ export default class ChatSuggest extends Component {
} }
} }
class Suggest extends Component { const Row = (row) => {
render() { return (
const { item } = this.props; <div className="chat-suggest__row d-flex">
return <div className="chat-suggest__item d-flex">{item.text}</div>; {row.map((item, i) => (
} <Suggest item={item} key={i} />
} ))}
</div>
);
};
const Suggest = (item) => {
return <div className="chat-suggest__row--item d-flex">{item.text}</div>;
};

Loading…
Cancel
Save