diff --git a/src/components/Article.js b/src/components/Article.js index 13a2cefe..058223b8 100644 --- a/src/components/Article.js +++ b/src/components/Article.js @@ -1,60 +1,60 @@ -const React = require('react') -const dateFormat = require('../lib/date').dateFormat +import React from 'react' +import { dateFormat } from '../lib/date' -const Tag = ({children}) => ( -
  • - {children} -
  • +const Tag = ({ children }) => ( +
  • + {children} +
  • ) -const TagList = ({tags}) => ( - +const TagList = ({ tags }) => ( + ) -const Head = ({date, tags = [], children}) => ( -
    -

    {children}

    +const Head = ({ date, tags = [], children }) => ( +
    +

    {children}

    - {!date ? null : ( -

    {dateFormat(date)}

    - )} + {!date ? null : ( +

    {dateFormat(date)}

    + )} - {!(tags.length) ? null : ( - - )} -
    + {!(tags.length) ? null : ( + + )} +
    ) const Share = () => ( -
    -
    Поделиться
    -
    Поделиться
    -
    Отправить
    -
    Твитнуть
    -
    +
    +
    Поделиться
    +
    Поделиться
    +
    Отправить
    +
    Твитнуть
    +
    ) -const Article = ({children, date, tags, title, shareable}) => ( -
    - - {title} - +const Article = ({ children, date, tags, title, shareable }) => ( +
    + + {title} + -
    - {children} -
    +
    + {children} +
    - {!shareable ? null : ( - - )} -
    + {!shareable ? null : ( + + )} +
    ) -module.exports = Article +export default Article