diff --git a/src/components/Card/Card.tsx b/src/components/Card/Card.tsx index 3d66ec3..84f2666 100644 --- a/src/components/Card/Card.tsx +++ b/src/components/Card/Card.tsx @@ -3,6 +3,7 @@ import { Link } from "react-router-dom"; import "./Card.scss"; export interface CardProps { + event_id: number; title: string; start_time: string; text: string; @@ -12,7 +13,7 @@ export interface CardState {} class Card extends React.Component { render() { - const { title, text, image } = this.props; + const { title, text, image, event_id } = this.props; let options = { day: "numeric", month: "numeric", @@ -22,7 +23,7 @@ class Card extends React.Component { }; const datetime = new Date(this.props.start_time).toLocaleString("fi-FI", options); return ( - +
{datetime}
{title}
diff --git a/src/pages/FrontPage/FrontPage.tsx b/src/pages/FrontPage/FrontPage.tsx index e430452..e994759 100644 --- a/src/pages/FrontPage/FrontPage.tsx +++ b/src/pages/FrontPage/FrontPage.tsx @@ -82,10 +82,11 @@ class FrontPage extends React.Component { {events.map(event => ( ))}