mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
refactor: make components for rules, description, rename stats
This commit is contained in:
@@ -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;
|
||||
Reference in New Issue
Block a user