SHARE
TWEET

Untitled

a guest Jun 20th, 2019 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. renderSlides () {
  2.   const { posts } = this.state
  3.   const postsAvailable = posts.length > 0
  4.  
  5.   if (!postsAvailable) return null
  6.   return posts.map((post, index) => {
  7.     if (!post.message) return null
  8.     return (
  9.       <div key={post.id} ref={slider => (this.slider = slider)}>
  10.         {index === 0 && <SliderItem />}
  11.         {index >= 1 && (
  12.           <div className='item'>
  13.             <img
  14.               data-fb={post.full_picture}
  15.             />
  16.             <div className={`item-content slide-${post.id}`}>
  17.               <p className='text'>{post.message}</p>
  18.             </div>
  19.           </div>
  20.         )}
  21.       </div>
  22.     )
  23.   })
  24. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top