mirror of
https://github.com/mgerb/mywebsite
synced 2026-01-10 09:52:51 +00:00
fixed html in preview
This commit is contained in:
@@ -13,8 +13,7 @@ export default class Preview extends React.Component {
|
||||
<div class="date">
|
||||
{posts[i].date}
|
||||
</div>
|
||||
<h1 class="intro" >{posts[i].title.toString()}</h1>
|
||||
<p>{posts[i].intro.toString()}</p>
|
||||
<div dangerouslySetInnerHTML={{__html : posts[i].title.toString() + posts[i].intro.toString()}} />
|
||||
<p>
|
||||
<Link class="link" to={`/post/${posts[i].category}/${posts[i].filename}`}>
|
||||
continue reading <i class="fa fa-caret-right" aria-hidden="true"></i>
|
||||
|
||||
@@ -23,7 +23,6 @@ export default class Index extends React.Component {
|
||||
this.page === 'post' ? this.props.actions.fetchPost(this.props.params.category, this.props.params.post) : "";
|
||||
}
|
||||
|
||||
|
||||
componentWillReceiveProps(nextProps) {
|
||||
if (this.props.params !== nextProps.params) {
|
||||
const params = nextProps.params;
|
||||
@@ -58,6 +57,6 @@ export default class Index extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
const loadingElement = <div class="Loading">
|
||||
const loadingElement = <div class="Loading">
|
||||
<img src={loading} alt="loading..."/>
|
||||
</div>;
|
||||
|
||||
Reference in New Issue
Block a user