initial pass at media page
This commit is contained in:
parent
5ac22dff6c
commit
84d56cbeaa
11 changed files with 1224 additions and 58 deletions
24
components/MediaItem.tsx
Normal file
24
components/MediaItem.tsx
Normal file
|
@ -0,0 +1,24 @@
|
|||
import PhotoGallery from './PhotoGallery'
|
||||
import YoutubeVideo from './YouTubeVideo'
|
||||
|
||||
const MediaItem = (props) => {
|
||||
const { type, title, data } = props
|
||||
|
||||
if (type !== 'video' && type !== 'photos') return null
|
||||
|
||||
const item =
|
||||
type === 'video' ? (
|
||||
<YoutubeVideo title={title} data={data} />
|
||||
) : (
|
||||
<PhotoGallery title={title} data={data} />
|
||||
)
|
||||
|
||||
return (
|
||||
<div className="mb-12 w-full border border-solid border-primary-900">
|
||||
<h3 className="bg-primary-600 px-4 py-3 text-center text-sm font-bold text-white">{title}</h3>
|
||||
{item}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default MediaItem
|
Loading…
Add table
Add a link
Reference in a new issue