Add "should show badges" feature flag
This commit is contained in:
parent
dd342e1f22
commit
ab543aea93
5 changed files with 29 additions and 3 deletions
16
ts/badges/shouldShowBadges.ts
Normal file
16
ts/badges/shouldShowBadges.ts
Normal file
|
@ -0,0 +1,16 @@
|
|||
// Copyright 2021 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { isEnabled } from '../RemoteConfig';
|
||||
import { getEnvironment, Environment } from '../environment';
|
||||
|
||||
export function shouldShowBadges(): boolean {
|
||||
return (
|
||||
isEnabled('desktop.showUserBadges') ||
|
||||
isEnabled('desktop.internalUser') ||
|
||||
getEnvironment() === Environment.Staging ||
|
||||
getEnvironment() === Environment.Development ||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
Boolean((window as any).STORYBOOK_ENV)
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue