blob: 39f7e9cd67adac16c90db38f94e8b6b5679a8a2f (
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
|
import { reaction } from 'mobx';
import { CommunityRecipesStore } from './store';
const debug = require('debug')('Ferdi:feature:communityRecipes');
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 = true;
},
{
fireImmediately: true,
},
);
}
|