From 3a6440e5b00138d1823bc006210bf9e6e59781a2 Mon Sep 17 00:00:00 2001 From: Roman Timashev Date: Thu, 25 May 2017 21:48:45 +0300 Subject: [PATCH] Article component flexibility updated --- src/components/Article.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/Article.js b/src/components/Article.js index fc89b062..f69093db 100644 --- a/src/components/Article.js +++ b/src/components/Article.js @@ -17,15 +17,17 @@ const Share = () => ( ) -const Article = ({data, url, title, date, shareable}) => ( +const Article = ({children, data, url, title, date, shareable}) => (
{title} -

{dateFormat(date)}

+ {!date ? null : ( +

{dateFormat(date)}

+ )}
- {getHtml(data)} + {children || getHtml(data)}
{!shareable ? null : (