import React, { Component } from 'react';
 
export default class GameArticlePreview extends Component {
  render() {
    const {article} = this.props,
          date = new Date(article.published);
      
    return (
      <div id="gamepackage-top-stories">
        <article className="sub-module top-stories">
          <a className="webview-internal">
        		<header className="top-stories__story-header">
        			<h1>{article.headline}</h1>
        			<p className="webview-internal">{article.description}</p>
        			<div className="meta">
        				<span className="timestamp"><span className="date">{date.getDate() + '/' + (date.getMonth()+1) + '/' + date.getFullYear()}</span></span>
        				<span className="author">{article.source}</span>
        			</div>
        		</header>
          </a>
        </article>
      </div>
		)
  }
};