import htm from "https://unpkg.com/htm?module"; import format from "https://unpkg.com/date-fns@2.7.0/esm/format/index.js?module"; const html = htm.bind(h); // Preview component for a Post const Post = createClass({ render() { const entry = this.props.entry; return html`

${entry.getIn(["data", "title"], null)}

${" by Author"}

${entry.getIn(["data", "summary"], "")}

${this.props.widgetFor("body")}

${ entry.getIn(["data", "tags"], []).map( tag => html` ` ) }

`; } }); export default Post;