[www] ArticleCard clean: Image from component

This commit is contained in:
Roman Timashev committed 2017-10-23 23:17:00 +03:00
1 parent 39ce95746f
commit f723724613
1 file changed
+1 -11
+1 -11
View File
@@ -1,21 +1,11 @@
const React = require('react')
const dateFormat = require('../lib/date').dateFormat
const Image = require('./Image')
const Date = ({children}) => (
<p className="date">{dateFormat(children)}</p>
)
const Image = ({data, alt}) => (
<picture>
<img
className="opa"
alt={alt}
src={data.src}
srcSet={data.set.map(({url, density}) => `${url} ${density}x`)}
/>
</picture>
)
const Link = ({href, children}) => (
<a className="invisible" href={href}>
{children}