Update design for clicking on badges

This commit is contained in:
Evan Hahn 2021-11-18 14:01:53 -06:00 committed by GitHub
parent 80320d8825
commit 1ba48512f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 58 additions and 28 deletions

View file

@ -14,7 +14,6 @@ import { BadgeDialog } from '../BadgeDialog';
import type { BadgeType } from '../../badges/types';
import { SharedGroupNames } from '../SharedGroupNames';
import { ConfirmationDialog } from '../ConfirmationDialog';
import { shouldShowBadges } from '../../badges/shouldShowBadges';
export type PropsDataType = {
areWeAdmin: boolean;
@ -107,13 +106,8 @@ export const ContactModal = ({
theme={theme}
title={contact.title}
unblurredAvatarPath={contact.unblurredAvatarPath}
onClick={() => {
setView(
preferredBadge && shouldShowBadges()
? ContactModalView.ShowingBadges
: ContactModalView.ShowingAvatar
);
}}
onClick={() => setView(ContactModalView.ShowingAvatar)}
onClickBadge={() => setView(ContactModalView.ShowingBadges)}
/>
<div className="ContactModal__name">{contact.title}</div>
<div className="module-about__container">

View file

@ -15,7 +15,6 @@ import type { LocalizerType, ThemeType } from '../../../types/Util';
import { bemGenerator } from './util';
import { BadgeDialog } from '../../BadgeDialog';
import type { BadgeType } from '../../../badges/types';
import { shouldShowBadges } from '../../../badges/shouldShowBadges';
export type Props = {
badges?: ReadonlyArray<BadgeType>;
@ -92,11 +91,10 @@ export const ConversationDetailsHeader: React.ComponentType<Props> = ({
{...conversation}
noteToSelf={isMe}
onClick={() => {
setActiveModal(
preferredBadge && shouldShowBadges()
? ConversationDetailsHeaderActiveModal.ShowingBadges
: ConversationDetailsHeaderActiveModal.ShowingAvatar
);
setActiveModal(ConversationDetailsHeaderActiveModal.ShowingAvatar);
}}
onClickBadge={() => {
setActiveModal(ConversationDetailsHeaderActiveModal.ShowingBadges);
}}
sharedGroupNames={[]}
theme={theme}