From abec097da19a56a73270a3e9b30198c07b1210ea Mon Sep 17 00:00:00 2001
From: Florian Orben <florian.orben@gmail.com>
Date: Fri, 13 Nov 2015 03:15:33 +0100
Subject: PLT-1125: allow to toggle features in frontend

---
 web/react/utils/utils.jsx | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'web/react/utils/utils.jsx')

diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx
index 9b2f7e057..432cb05e0 100644
--- a/web/react/utils/utils.jsx
+++ b/web/react/utils/utils.jsx
@@ -1221,3 +1221,7 @@ export function getPostTerm(post) {
 
     return postTerm;
 }
+
+export function featureToggle(feature) {
+    return PreferenceStore.getPreference(Constants.Preferences.CATEGORY_ADVANCED_SETTINGS, 'feature_enabled_' + feature, {value: 'false'}).value === 'true';
+}
-- 
cgit v1.2.3-1-g7c22

