import React from 'react'; import { ArticlePhoto } from '../dto/site/ArticlePhoto'; /** * Common photos renderer props */ export type CommonPhotosRendererProps = { /** * Photos */ photos?: ArticlePhoto[]; /** * No content */ noContent?: boolean; }; /** * Common photos renderer * @param props Props */ export function CommonPhotosRenderer(props: CommonPhotosRendererProps) { // Destruct const { photos, noContent } = props; if (photos == null || photos.length < 1) return; return (
{photos.map((photo, index) => (
{photo.title {photo.title && (
{photo.title}
)}
))}
); }