import React, { Component } from "react" import moment from "moment" import Menu, { MenuHeader, MenuLink, MenuGap } from '../../common/Menu' export default class StoryContentMenu extends Component { render() { const { story } = this.props console.log(story.tags) return ( Chapters Tags Story {story.author} ) } } function ChapterMenu({chapters, storyId}) { return chapters.map((chapter, index) => ( {chapter.title} )) } function TagMenu({tags}) { return tags.map(tag => ( {tag.name} )) } function MonthMenuItem({date}) { const fictionalDate = moment.utc(date) if (fictionalDate.year() < 100) { return null } const monthKey = fictionalDate.format("YYYY-MM") const monthText = fictionalDate.format("MMM D, YYYY") return {monthText} }