Skip to content

Commit 26570b8

Browse files
committed
rename to FeatureFlag
1 parent 4bfa002 commit 26570b8

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

modules/app-config/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import {getFeatureFlag} from '../../source/lib/storage'
2-
import {AppConfigEntry, FeatureFlagType} from './types'
2+
import {AppConfigEntry, FeatureFlag} from './types'
33
import {useQuery} from '@tanstack/react-query'
44
import {isDevMode} from '@frogpond/constants'
55

6-
export type {AppConfigEntry, FeatureFlagType} from './types'
6+
export type {AppConfigEntry, FeatureFlag} from './types'
77

88
// helper method to query exported __DEV__ feature flags
99
export const useFeature = (featureKey: AppConfigEntry): boolean => {
@@ -19,7 +19,7 @@ export const useFeature = (featureKey: AppConfigEntry): boolean => {
1919
}
2020

2121
// datastore for the __DEV__ feature flags
22-
export const AppConfig = async (): Promise<FeatureFlagType[]> => {
22+
export const AppConfig = async (): Promise<FeatureFlag[]> => {
2323
return [
2424
{
2525
title: 'Show the course search recents screen',

modules/app-config/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export interface FeatureFlagType {
1+
export interface FeatureFlag {
22
configKey: AppConfigEntry
33
title: string
44
active: boolean

source/views/settings/screens/feature-flags.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ import * as c from '@frogpond/colors'
1010
import {LoadingView, NoticeView} from '@frogpond/notice'
1111
import {toLaxTitleCase} from '@frogpond/titlecase'
1212
import {Touchable} from '@frogpond/touchable'
13-
import {AppConfig, FeatureFlagType} from '@frogpond/app-config'
13+
import {AppConfig, FeatureFlag} from '@frogpond/app-config'
1414

1515
import {groupBy, orderBy} from 'lodash'
1616
import {commonStyles} from '../../../../modules/navigation-buttons/styles'
1717
import * as storage from '../../../lib/storage'
1818

1919
export const FeatureFlagsView = (): JSX.Element => {
2020
let [loading, setLoading] = React.useState(true)
21-
let [sections, setSections] = React.useState<FeatureFlagType[]>([])
21+
let [sections, setSections] = React.useState<FeatureFlag[]>([])
2222

2323
React.useEffect(() => {
2424
async function fetchData() {
@@ -33,11 +33,11 @@ export const FeatureFlagsView = (): JSX.Element => {
3333
return <ListEmpty mode="bug" />
3434
}
3535

36-
let findGroup = (configKey: FeatureFlagType['configKey']) => {
36+
let findGroup = (configKey: FeatureFlag['configKey']) => {
3737
return configKey.split('_')?.[0] ?? 'Unknown'
3838
}
3939

40-
let sorters: Array<(flag: FeatureFlagType) => string> = [
40+
let sorters: Array<(flag: FeatureFlag) => string> = [
4141
(flag) => findGroup(flag.configKey),
4242
(flag) => flag.title,
4343
]

0 commit comments

Comments
 (0)