import Paper from '@mui/material/Paper' import { format } from 'date-fns/fp' import * as R from 'ramda' import { React, useState } from 'react' import { InformativeDialog } from '../../components/InformativeDialog' import { Label2, H3 } from '../../components/typography' import CameraIcon from '../../styling/icons/ID/photo/comet.svg?react' import PhotosCarousel from './components/PhotosCarousel' const CustomerPhotos = ({ photosData, timezone }) => { 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 (