mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
27 lines
651 B
TypeScript
27 lines
651 B
TypeScript
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;
|