import { makeStyles, Paper } from '@material-ui/core' import { format } from 'date-fns/fp' import * as R from 'ramda' import { React, useState } from 'react' import { InformativeDialog } from 'src/components/InformativeDialog' import { Label2, H3 } from 'src/components/typography' import { ReactComponent as CameraIcon } from 'src/styling/icons/ID/photo/comet.svg' import { URI } from 'src/utils/apollo' import styles from './CustomerPhotos.styles' import PhotosCarousel from './components/PhotosCarousel' const useStyles = makeStyles(styles) const CustomerPhotos = ({ photosData, timezone }) => { const classes = useStyles() const [photosDialog, setPhotosDialog] = useState(false) const [photoClickedIndex, setPhotoClickIndex] = useState(null) const orderedPhotosData = !R.isNil(photoClickedIndex) ? R.compose(R.flatten, R.reverse, R.splitAt(photoClickedIndex))(photosData) : photosData return (