/* eslint-disable react/prop-types */ import { h, Fragment } from 'preact' import { useEffect } from 'preact/hooks' import enGB from 'date-fns/locale/en-GB' import { H1, Label } from '../../components/Text' import Markdown from '../../components/Markdown' import translations from '../../data/strings' import InfoLayout from '../../layouts/InfoLayout' import VideoEmbed from '../../components/VideoEmbed' import { EpisodeCard, Title, InfoContent, Row, LogosRow, ActionButton as Button, TrailerContainer, } from './styles' import Page from '../../layouts/Page' import { splitArray } from '../../helpers/utils' import { defaultTheme } from '../../assets/theme' const SeriesPage = ({ data }) => { const theme = data.theme || defaultTheme const { orgs } = data const credits = data.credits ? ` ## Credits ${data.credits} ` : null const orgsList = Object.values(orgs || {}) const links = data.links.length ? splitArray(data.links, 2) : null return (

{data.title}:

{data.subtitle}

{data.description ? {data.description} : null} {data.trailer ? ( ) : null} {links ? links.map(linkRow => {linkRow.map(link => ( ))} ) : null }
{data.episodes.future.length ? ( {translations.en.program}: {data.episodes.future.map(feeditem => ( ))} ) : null} {data.episodes.past.length ? ( Past streams: {data.episodes.past.map(feeditem => ( null} // todo: fix this {...feeditem} /> ))} ) : null} {credits ? {credits} : null}
{orgsList.length ? ( {orgsList.map((org, index) => ( {`${org.orgName} {orgsList.length === 2 && index + 1 !== orgsList.length ? : null} ))} ) : null}
) } export default SeriesPage