feat(subplebbit): add feed, posts

This commit is contained in:
plebeius.eth
2024-03-22 15:31:02 +01:00
parent 452c98f58b
commit f1af55edf0
5 changed files with 87 additions and 3 deletions
+2 -2
View File
@@ -5,7 +5,7 @@ import { Trans, useTranslation } from 'react-i18next';
export interface BoardStatsProps {
address: string | undefined;
createdAt: number;
createdAt: number | undefined;
}
const BoardStats = ({ address, createdAt }: BoardStatsProps) => {
@@ -59,7 +59,7 @@ const BoardStats = ({ address, createdAt }: BoardStatsProps) => {
</tr>
<tr>
<td className={styles.lowercase}>
{unixToMMDDYYYY(createdAt)} {t('board_created')}
{createdAt && unixToMMDDYYYY(createdAt)} {t('board_created')}
{' / '}
<Trans
i18nKey='board_stats_all'
+1
View File
@@ -0,0 +1 @@
export { default } from './post';
+3
View File
@@ -0,0 +1,3 @@
.thread {
clear: both;
}
+15
View File
@@ -0,0 +1,15 @@
import { Comment } from '@plebbit/plebbit-react-hooks';
import styles from './post.module.css';
const Post = ({ post }: Comment) => {
const { content, link, title } = post;
return (
<div>
<hr />
<h1>{post.title}</h1>
<p>{post.content}</p>
</div>
);
};
export default Post;