Skip to content

Commit

Permalink
Merge pull request #3 from Erica-WX/x-new-branch
Browse files Browse the repository at this point in the history
X new branch
  • Loading branch information
Erica-WX authored Apr 23, 2019
2 parents 900064d + 43fa90b commit 8a931e4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion frontend/src/view/components/post/post-preview.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as React from 'react';
import { ResData } from '../../../config/api';
import { Link } from 'react-router-dom';

interface Props {
data:ResData.Post;
Expand All @@ -9,8 +10,13 @@ interface State {

export class PostPreview extends React.Component<Props, State> {
public render () {

const {attributes, id} = this.props.data;
return <div>
{this.props.data.attributes.body}
<Link className="title" to={`/thread/${id}`}>{ attributes.title }</Link>
<div className="biref">
{attributes.body}
</div>
</div>;
}
}

0 comments on commit 8a931e4

Please sign in to comment.