@@ -19,6 +19,7 @@ import './styles.scss';
1919
2020type Props = { |
2121 addon : AddonType ,
22+ hideUsers ?: boolean ,
2223| } ;
2324
2425type DefaultProps = { |
@@ -49,8 +50,9 @@ export class AddonBadgesBase extends React.Component<InternalProps> {
4950 renderAndroidCompatibleBadge ( ) : React . Node {
5051 const { addon , clientApp , i18n } = this . props ;
5152
52- if ( clientApp !== CLIENT_APP_FIREFOX || ! addon . isAndroidCompatible )
53+ if ( clientApp !== CLIENT_APP_FIREFOX || ! addon . isAndroidCompatible ) {
5354 return null ;
55+ }
5456
5557 return (
5658 < Badge
@@ -64,7 +66,9 @@ export class AddonBadgesBase extends React.Component<InternalProps> {
6466 renderExperimentalBadge ( ) : React . Node {
6567 const { addon, i18n } = this . props ;
6668
67- if ( ! addon . is_experimental ) return null ;
69+ if ( ! addon . is_experimental ) {
70+ return null ;
71+ }
6872
6973 return (
7074 < Badge
@@ -78,7 +82,9 @@ export class AddonBadgesBase extends React.Component<InternalProps> {
7882 renderRequiresPaymentBadge ( ) : React . Node {
7983 const { addon, i18n } = this . props ;
8084
81- if ( ! addon . requires_payment ) return null ;
85+ if ( ! addon . requires_payment ) {
86+ return null ;
87+ }
8288
8389 return (
8490 < Badge
@@ -98,7 +104,9 @@ export class AddonBadgesBase extends React.Component<InternalProps> {
98104 forBadging : true ,
99105 } ) ;
100106
101- if ( ! promotedCategory ) return null ;
107+ if ( ! promotedCategory ) {
108+ return null ;
109+ }
102110
103111 const props = getPromotedProps ( i18n , promotedCategory ) ;
104112
@@ -116,7 +124,9 @@ export class AddonBadgesBase extends React.Component<InternalProps> {
116124 renderRatingMeta ( ) : React . Node {
117125 const { addon, i18n, location } = this . props ;
118126
119- if ( ! addon ?. ratings ) return null ;
127+ if ( ! addon ?. ratings ) {
128+ return null ;
129+ }
120130
121131 const addonRatingCount : number = addon . ratings . count ;
122132 const averageRating : number = addon . ratings . average ;
@@ -145,9 +155,11 @@ export class AddonBadgesBase extends React.Component<InternalProps> {
145155 }
146156
147157 renderUserCount ( ) : React . Node {
148- const { addon, i18n } = this . props ;
158+ const { addon, hideUsers , i18n } = this . props ;
149159
150- if ( ! addon ) return null ;
160+ if ( ! addon || hideUsers ) {
161+ return null ;
162+ }
151163
152164 const averageDailyUsers = addon . average_daily_users ;
153165
0 commit comments