blob: 608164b68004718fb61f93144e35acf6fc494f2c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
import { reaction } from 'mobx';
import { CommunityRecipesStore } from './store';
const debug = require('debug')('Ferdi:feature:communityRecipes');
export const DEFAULT_SERVICE_LIMIT = 3;
export const communityRecipesStore = new CommunityRecipesStore();
export default function initCommunityRecipes(stores, actions) {
const { features } = stores;
communityRecipesStore.start(stores, actions);
// Toggle communityRecipe premium status
reaction(
() => (
features.features.isCommunityRecipesIncludedInCurrentPlan
),
(isPremiumFeature) => {
debug('Community recipes is premium feature: ', isPremiumFeature);
communityRecipesStore.isCommunityRecipesIncludedInCurrentPlan = isPremiumFeature;
},
{
fireImmediately: true,
},
);
}
|