import { FC } from 'react'; import dynamic from 'next/dynamic'; import styles from './ChatJoinMessage.module.scss'; import { ModerationBadge } from '../ChatUserBadge/ModerationBadge'; // Lazy loaded components const TeamOutlined = dynamic(() => import('@ant-design/icons/TeamOutlined'), { ssr: false, }); export type ChatJoinMessageProps = { isAuthorModerator: boolean; userColor: number; displayName: string; }; export const ChatJoinMessage: FC = ({ isAuthorModerator, userColor, displayName, }) => { const color = `var(--theme-color-users-${userColor})`; return (
{displayName} {isAuthorModerator && ( )} {' '} joined the chat.
); };