Add about field to ConversationDetailsHeader

This commit is contained in:
Fedor Indutny 2021-10-27 16:33:06 -07:00 committed by GitHub
parent ddc98d8ee6
commit d7edbabd48
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 54 additions and 16 deletions

View file

@ -125,7 +125,7 @@ export const Button = React.forwardRef<HTMLButtonElement, PropsType>(
'module-Button',
sizeClassName,
variantClassName,
`module-Button__icon--${icon}`,
icon && `module-Button--icon--${icon}`,
className
)}
disabled={disabled}

View file

@ -9,6 +9,7 @@ import { AvatarLightbox } from '../../AvatarLightbox';
import type { ConversationType } from '../../../state/ducks/conversations';
import { Emojify } from '../Emojify';
import { GroupDescription } from '../GroupDescription';
import { About } from '../About';
import type { GroupV2Membership } from './ConversationDetailsMembershipList';
import type { LocalizerType } from '../../../types/Util';
import { bemGenerator } from './util';
@ -54,7 +55,16 @@ export const ConversationDetailsHeader: React.ComponentType<Props> = ({
]);
}
} else if (!isMe) {
subtitle = conversation.phoneNumber;
subtitle = (
<>
<div className={bem('subtitle__about')}>
<About text={conversation.about} />
</div>
<div className={bem('subtitle__phone-number')}>
{conversation.phoneNumber}
</div>
</>
);
}
const avatar = (