Force modern emoji experimental to be dev mode only (#35505)
This commit is contained in:
parent
6fc77a545b
commit
dfaca794bf
6 changed files with 26 additions and 19 deletions
|
|
@ -1,3 +1,5 @@
|
|||
import initialState from '../initial_state';
|
||||
|
||||
export function isDevelopment() {
|
||||
if (typeof process !== 'undefined')
|
||||
return process.env.NODE_ENV === 'development';
|
||||
|
|
@ -9,3 +11,13 @@ export function isProduction() {
|
|||
return process.env.NODE_ENV === 'production';
|
||||
else return import.meta.env.PROD;
|
||||
}
|
||||
|
||||
export type Features = 'modern_emojis';
|
||||
|
||||
export function isFeatureEnabled(feature: Features) {
|
||||
return initialState?.features.includes(feature) ?? false;
|
||||
}
|
||||
|
||||
export function isModernEmojiEnabled() {
|
||||
return isFeatureEnabled('modern_emojis') && isDevelopment();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue