@@ -5,17 +5,6 @@ import {isDevMode} from '@frogpond/constants'
55
66export type { AppConfigKey , FeatureFlagType } from './types'
77
8- // datastore for the __DEV__ feature flags
9- export const AppConfig = async ( ) : Promise < FeatureFlagType [ ] > => {
10- return [
11- {
12- configKey : AppConfigKey . TestDataKey ,
13- title : 'Test config key' ,
14- active : await getFeatureFlag ( AppConfigKey . TestDataKey ) ,
15- } ,
16- ]
17- }
18-
198// helper method to query exported __DEV__ feature flags
209const useFeature = ( featureKey : AppConfigKey ) : boolean => {
2110 let { data : featureValue = false } = useQuery ( {
@@ -29,6 +18,17 @@ const useFeature = (featureKey: AppConfigKey): boolean => {
2918 return isDevMode ( ) ? featureValue : false
3019}
3120
21+ // datastore for the __DEV__ feature flags
22+ export const AppConfig = async ( ) : Promise < FeatureFlagType [ ] > => {
23+ return [
24+ {
25+ title : 'Show the course search recents screen' ,
26+ configKey : AppConfigKey . Courses_ShowRecentSearchScreen ,
27+ active : await getFeatureFlag ( AppConfigKey . Courses_ShowRecentSearchScreen ) ,
28+ } ,
29+ ]
30+ }
31+
3232// exported feature flags
33- export const useTestFeature = ( ) : boolean =>
34- useFeature ( AppConfigKey . TestDataKey )
33+ export const useCourseSearchRecentsScreen = ( ) : boolean =>
34+ useFeature ( AppConfigKey . Courses_ShowRecentSearchScreen )
0 commit comments