11import { getFeatureFlag } from '../../source/lib/storage'
2- import { AppConfigKey , FeatureFlagType } from './types'
2+ import { AppConfigType , FeatureFlagType } from './types'
33import { useQuery } from '@tanstack/react-query'
44import { isDevMode } from '@frogpond/constants'
55
6- export type { AppConfigKey , FeatureFlagType } from './types'
6+ export type { AppConfigType , FeatureFlagType } from './types'
77
88// helper method to query exported __DEV__ feature flags
9- const useFeature = ( featureKey : AppConfigKey ) : boolean => {
9+ const useFeature = ( featureKey : AppConfigType ) : boolean => {
1010 let { data : featureValue = false } = useQuery ( {
1111 queryKey : [ 'app' , 'app:feature-flag' , featureKey ] ,
1212 queryFn : ( ) => getFeatureFlag ( featureKey ) ,
@@ -23,12 +23,14 @@ export const AppConfig = async (): Promise<FeatureFlagType[]> => {
2323 return [
2424 {
2525 title : 'Show the course search recents screen' ,
26- configKey : AppConfigKey . Courses_ShowRecentSearchScreen ,
27- active : await getFeatureFlag ( AppConfigKey . Courses_ShowRecentSearchScreen ) ,
26+ configKey : AppConfigType . Courses_ShowRecentSearchScreen ,
27+ active : await getFeatureFlag (
28+ AppConfigType . Courses_ShowRecentSearchScreen ,
29+ ) ,
2830 } ,
2931 ]
3032}
3133
3234// exported feature flags
3335export const useCourseSearchRecentsScreen = ( ) : boolean =>
34- useFeature ( AppConfigKey . Courses_ShowRecentSearchScreen )
36+ useFeature ( AppConfigType . Courses_ShowRecentSearchScreen )
0 commit comments