Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add "should show badges" feature flag
- Loading branch information
1 parent
c76b5df
commit 65b21be
Showing
5 changed files
with
23 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters