The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/apps/meteor/client/components/message/header/MessageRoles.tsx

24 lines
648 B

import { MessageRole, MessageRoles as FuselageMessageRoles } from '@rocket.chat/fuselage';
import { useTranslation } from '@rocket.chat/ui-contexts';
import type { ReactElement } from 'react';
import React from 'react';
type MessageRolesProps = {
roles: Array<string>;
isBot?: boolean;
};
const MessageRoles = ({ roles, isBot }: MessageRolesProps): ReactElement | null => {
const t = useTranslation();
return (
<FuselageMessageRoles>
{roles.map((role, index) => (
<MessageRole key={index}>{role}</MessageRole>
))}
{isBot && <MessageRole>{t('Bot')}</MessageRole>}
</FuselageMessageRoles>
);
};
export default MessageRoles;