mirror of
https://github.com/astuto/astuto.git
synced 2025-12-16 03:37:56 +01:00
Add basic version of post show page
This commit is contained in:
@@ -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)}
|
||||
|
||||
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user