refactor: make components for rules, description, rename stats

This commit is contained in:
plebeius.eth
2024-04-09 15:03:26 +02:00
parent 6c86cc0124
commit 9aab7624ec
11 changed files with 69 additions and 59 deletions
@@ -0,0 +1 @@
export { default } from './subplebbit-description';
@@ -0,0 +1,26 @@
import Post from '../post';
interface DescriptionPostProps {
subplebbitAddress: string | undefined;
createdAt: number;
description: string;
avatarUrl?: string;
title: string;
}
export const SubplebbitDescription = ({ subplebbitAddress, createdAt, description, avatarUrl, title }: DescriptionPostProps) => {
const post = {
isDescription: true,
subplebbitAddress,
timestamp: createdAt,
author: { displayName: '## Board Mods' },
content: description,
link: avatarUrl,
title: 'Welcome to ' + title,
pinned: true,
locked: true,
};
return <Post post={post} />;
};
export default SubplebbitDescription;