diff --git a/app/javascript/mastodon/utils/environment.ts b/app/javascript/mastodon/utils/environment.ts index e2936bd224..9e30be6587 100644 --- a/app/javascript/mastodon/utils/environment.ts +++ b/app/javascript/mastodon/utils/environment.ts @@ -18,7 +18,7 @@ export function isServerFeatureEnabled(feature: ServerFeatures) { return initialState?.features.includes(feature) ?? false; } -type ClientFeatures = never; +type ClientFeatures = 'redesign'; export function isClientFeatureEnabled(feature: ClientFeatures) { try { @@ -30,3 +30,8 @@ export function isClientFeatureEnabled(feature: ClientFeatures) { return false; } } + +/* Checks if the 5.0 redesign features are enabled or not. */ +export function isRedesignEnabled() { + return isClientFeatureEnabled('redesign'); +}