import copy from '../js/data/copy.json'
import {
isNotNullNorUndefined,
parseDate,
formatterWithYear
} from '../js/utilities'
import React from 'react'
import Spinner from './presentational/Spinner'
import CardTimestamp from './presentational/Card/Timestamp'
import CardLocation from './presentational/Card/Location'
import CardCaret from './presentational/Card/Caret'
import CardTags from './presentational/Card/Tags'
import CardSummary from './presentational/Card/Summary'
import CardSource from './presentational/Card/Source'
import CardCategory from './presentational/Card/Category'
import CardNarrative from './presentational/Card/Narrative'
class Card extends React.Component {
constructor(props) {
super(props)
this.state = {
isOpen: false
}
}
toggle() {
this.setState({
isOpen: !this.state.isOpen
})
}
makeTimelabel(timestamp) {
if (timestamp === null) return null
const parsedTimestamp = parseDate(timestamp)
const timelabel = formatterWithYear(parsedTimestamp)
return timelabel
}
renderCategory() {
const categoryTitle = copy[this.props.language].cardstack.category
const categoryLabel = this.props.event.category
const color = this.props.getCategoryColor(this.props.event.category)
return null
// return (
//