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 (

{'Photos & files'}

{photosData.map((elem, idx) => ( ))}
} onDissmised={() => { setPhotosDialog(false) setPhotoClickIndex(null) }} />
) } export const PhotoCard = ({ idx, date, src, setPhotosDialog, setPhotoClickIndex, }) => { return ( { setPhotoClickIndex(idx) setPhotosDialog(true) }}>
{format('yyyy-MM-dd', new Date(date))}
) } export default CustomerPhotos