Add "should show badges" feature flag

This commit is contained in:
Evan Hahn 2021-11-09 09:51:56 -06:00 committed by GitHub
parent dd342e1f22
commit ab543aea93
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 29 additions and 3 deletions

View file

@ -14,6 +14,7 @@ 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;
@ -105,7 +106,7 @@ export const ContactModal = ({
unblurredAvatarPath={contact.unblurredAvatarPath}
onClick={() => {
setView(
preferredBadge
preferredBadge && shouldShowBadges()
? ContactModalView.ShowingBadges
: ContactModalView.ShowingAvatar
);