initial pass at media page

This commit is contained in:
Cory Dransfeldt 2022-06-07 12:30:17 -07:00
parent 5ac22dff6c
commit 84d56cbeaa
11 changed files with 1224 additions and 58 deletions

View file

@ -0,0 +1,21 @@
import 'photoswipe/dist/photoswipe.css'
import { Gallery, Item } from 'react-photoswipe-gallery'
import Image from './Image'
const PhotoGallery = (props) => {
const { title, data } = props
return (
<Gallery>
{data.length
? data.map((d: string) => (
<Item cropped key={d}>
{({ ref, open }) => <Image alt={title} ref={ref} onClick={open} src={d} />}
</Item>
))
: null}
</Gallery>
)
}
export default PhotoGallery