Files
5chan/src/components/subplebbit-description/subplebbit-description.tsx
T

30 lines
745 B
TypeScript
Raw Normal View History

import Post from '../post';
import { useTranslation } from 'react-i18next';
2024-04-12 14:28:06 +02:00
interface DescriptionPostProps {
subplebbitAddress: string | undefined;
createdAt: number;
description: string;
avatarUrl?: string;
title: string;
}
2024-04-12 14:28:06 +02:00
const SubplebbitDescription = ({ subplebbitAddress, createdAt, description, avatarUrl, title }: DescriptionPostProps) => {
const { t } = useTranslation();
const post = {
isDescription: true,
subplebbitAddress,
timestamp: createdAt,
author: { displayName: '## Board Mods' },
content: description,
link: avatarUrl,
title: t('welcome_to_board', { board: title }),
pinned: true,
locked: true,
};
return <Post post={post} />;
};
export default SubplebbitDescription;