`use strict` import { Component } from 'inferno' import { connect } from 'inferno-redux' import { fetchBlogList, fetchBlogEntry } from './actions' import './blog_entry.scss' class BlogEntryComponent extends Component { constructor(props) { super(props) this.entry_date = this.props.match.params.entry_date this.entry_name = this.props.match.params.entry_name } componentDidMount() { if(this.props.blog_list.length === 0) { this.props.fetchBlogList() } if(this.props.blog_entry_name !== this.entry_name) { this.props.fetchBlogEntry(this.entry_date, this.entry_name) } } render() { return [