Guest User

Untitled

a guest
Oct 21st, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. <Query query={ALL_BOT_ITEMS_QUERY}>
  2. {({loading, error, data}) => {
  3. if(loading) return <div className="preloader show"></div>
  4. if(error) return <p>Error: {error}</p>
  5.  
  6. return (
  7. <Scrollbars style={{height: '570px'}}>
  8. {data.allBotItems.map(item => {
  9. if(this.props.bot.choosenItemsIds.indexOf(item.id) === -1) {
  10. return <Item key={item.id} item={item} conditions={this.state.conditions} side='bot' />
  11. }
  12. })}
  13. </Scrollbars>
  14. )
  15. }}
  16. </Query>
Add Comment
Please, Sign In to add comment