]> git.localhorst.tv Git - alttp.git/blobdiff - resources/js/components/episodes/List.js
interactive map
[alttp.git] / resources / js / components / episodes / List.js
index a28fa4848968b9e2fa2a455cec44c55b7b74a8c9..a2a3b29f982d014bdcff9edd3db608843501a69a 100644 (file)
@@ -4,7 +4,7 @@ import React from 'react';
 
 import Item from './Item';
 
-const List = ({ episodes, onAddRestream, onEditRestream }) => {
+const List = ({ episodes, onAddRestream, onApply, onEditRestream }) => {
        const grouped = React.useMemo(() => episodes.reduce((groups, episode) => {
                const day = moment(episode.start).format('YYYY-MM-DD');
                return {
@@ -18,11 +18,14 @@ const List = ({ episodes, onAddRestream, onEditRestream }) => {
 
        return <div className="episodes-list">
                {Object.entries(grouped).map(([day, group]) => <div key={day}>
-                       <h2 className="text-center my-5">{moment(day).format('dddd, L')}</h2>
+                       <h2 className="text-center episodes-group-heading">
+                               {moment(day).format('dddd, L')}
+                       </h2>
                        {group.map(episode =>
                                <Item
                                        episode={episode}
                                        onAddRestream={onAddRestream}
+                                       onApply={onApply}
                                        onEditRestream={onEditRestream}
                                        key={episode.id}
                                />
@@ -36,6 +39,7 @@ List.propTypes = {
                start: PropTypes.string,
        })),
        onAddRestream: PropTypes.func,
+       onApply: PropTypes.func,
        onEditRestream: PropTypes.func,
 };