hooks/useSCPreferencesAndFeaturesEnabled
Functions
useSCPreferencesAndFeaturesEnabled()
useSCPreferencesAndFeaturesEnabled(
preferences
,features
):boolean
Custom hook preferences and features at the same time
Parameters
Parameter | Type | Default value | Description |
---|---|---|---|
preferences | string [] | undefined | array of preference keys |
features | SCFeatureName [] | [] | array of feature keys |
Returns
boolean
boolean - true only if all preferences and features are enabled
Ex. const isEnabled = useSCPreferencesAndFeaturesEnabled( [ SCPreferences.CONFIGURATIONS_POST_USER_ADDRESSING_ENABLED, SCPreferences.CONFIGURATIONS_SCHEDULED_POSTS_ENABLED ], [SCFeatureName.TAGGING] );