/* eslint-disable react/prop-types */ import { h, Fragment } from 'preact' import striptags from 'striptags' import { H1 } 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, ActionButton as Button, TrailerContainer, } from './styles' import Page from '../../layouts/Page' import { splitArray } from '../../helpers/utils' const SeriesPage = ({ data }) => { const credits = data.credits ? ` ## Credits ${data.credits} ` : null const dateString = `${new Date()}` let tzShort = // Works for the majority of modern browsers dateString.match(/\(([^\)]+)\)$/) || // IE outputs date strings in a different format: dateString.match(/([A-Z]+) [\d]{4}$/) if (tzShort) { // Old Firefox uses the long timezone name (e.g., "Central // Daylight Time" instead of "CDT") tzShort = tzShort[1].match(/[A-Z]/g).join('') } 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 {credits} : null}
) } export default SeriesPage