Add basic version of post show page

This commit is contained in:
riggraz
2019-09-12 15:51:45 +02:00
parent 5ca113b545
commit f599471af1
18 changed files with 330 additions and 11 deletions

View File

@@ -42,6 +42,7 @@ const PostList = ({
posts.length > 0 ?
posts.map((post, i) => (
<PostListItem
id={post.id}
title={post.title}
description={post.description}
postStatus={postStatuses.find(postStatus => postStatus.id === post.postStatusId)}

View File

@@ -3,13 +3,14 @@ import * as React from 'react';
import IPostStatus from '../../interfaces/IPostStatus';
interface Props {
id: number;
title: string;
description?: string;
postStatus: IPostStatus;
}
const PostListItem = ({ title, description, postStatus}: Props) => (
<a href="#" className="postLink">
const PostListItem = ({ id, title, description, postStatus}: Props) => (
<a href={`/posts/${id}`} className="postLink">
<div className="postListItem">
<div className="postTitle">{title}</div>
<div className="postDescription">