Files
supersonic/webapp/packages/supersonic-fe/src/pages/Chat/RightSection/index.tsx
jerryjzhang dc4fc69b57 first commit
2023-06-12 18:44:01 +08:00

29 lines
761 B
TypeScript

import classNames from 'classnames';
import Context from './Context';
import Introduction from './Introduction';
import styles from './style.less';
import type { MsgDataType } from 'supersonic-chat-sdk';
type Props = {
currentEntity?: MsgDataType;
};
const RightSection: React.FC<Props> = ({ currentEntity }) => {
const rightSectionClass = classNames(styles.rightSection, {
[styles.external]: true,
});
return (
<div className={rightSectionClass}>
{currentEntity && (
<div className={styles.entityInfo}>
{currentEntity?.chatContext && <Context chatContext={currentEntity.chatContext} />}
<Introduction currentEntity={currentEntity} />
</div>
)}
</div>
);
};
export default RightSection;