mirror of
https://github.com/astuto/astuto.git
synced 2025-12-15 19:27:52 +01:00
Add basic version of post show page
This commit is contained in:
@@ -16,6 +16,7 @@ const PostList = ({ posts, boards }: Props) => (
|
||||
posts.length > 0 ?
|
||||
posts.map((post, i) => (
|
||||
<PostListItem
|
||||
id={post.id}
|
||||
title={post.title}
|
||||
boardName={boards.find(board => board.id === post.board_id).name}
|
||||
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
import * as React from 'react';
|
||||
|
||||
interface Props {
|
||||
id: number;
|
||||
title: string;
|
||||
boardName: string;
|
||||
}
|
||||
|
||||
const PostListItem = ({title, boardName}: Props) => (
|
||||
<a href="#" className="postLink">
|
||||
const PostListItem = ({id, title, boardName}: Props) => (
|
||||
<a href={`/posts/${id}`} className="postLink">
|
||||
<div className="postListItem">
|
||||
<div className="postTitle">{title}</div>
|
||||
<div className="postBoard">{boardName}</div>
|
||||
|
||||
Reference in New Issue
Block a user