summaryrefslogtreecommitdiff
path: root/animism-align/frontend/app/views/viewer/player/components.utility/media.gallery.js
blob: 0d08c11b1a7cc0e4c7cf6db991beb2875e690313 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import React, { Component } from 'react'

export const Gallery = ({ media }) => {
  const { image_order, image_lookup, display_lookup, thumbnail_lookup } = media.settings

  // console.log(display_lookup)
  // console.log(width)
  return (
    <div className='gallery-items'>
      <div className='gallery-scroll'>
        {image_order.map(id => {
          const image = display_lookup[id]
          // console.log(image)
          return (
            <GalleryItem key={id} image={image} />
          )
        })}
      </div>
    </div>
  )
}

const GalleryItem = ({ image }) => {
  return (
    <div className='gallery-item'>
      <img src={image.url} />
    </div>
  )
}