2019-08-26 14:29:56 +02:00
|
|
|
import * as React from 'react';
|
|
|
|
|
|
2022-06-08 10:20:36 +02:00
|
|
|
import { TitleText, UppercaseText } from '../common/CustomTexts';
|
2019-09-15 18:26:51 +02:00
|
|
|
|
2019-08-26 14:29:56 +02:00
|
|
|
interface Props {
|
2019-09-12 15:51:45 +02:00
|
|
|
id: number;
|
2019-08-26 14:29:56 +02:00
|
|
|
title: string;
|
|
|
|
|
boardName: string;
|
2024-09-11 19:27:13 +02:00
|
|
|
openPostInNewTab: boolean;
|
2019-08-26 14:29:56 +02:00
|
|
|
}
|
|
|
|
|
|
2024-09-11 19:27:13 +02:00
|
|
|
const PostListItem = ({id, title, boardName, openPostInNewTab}: Props) => (
|
|
|
|
|
<a href={`/posts/${id}`} className="postLink" target={openPostInNewTab ? '_blank' : '_self'}>
|
2019-09-16 12:22:30 +02:00
|
|
|
<div className="postListItem">
|
2019-09-15 18:26:51 +02:00
|
|
|
<TitleText>{title}</TitleText>
|
|
|
|
|
<UppercaseText>{boardName}</UppercaseText>
|
2019-08-26 14:29:56 +02:00
|
|
|
</div>
|
|
|
|
|
</a>
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
export default PostListItem;
|