@@ -12,10 +12,13 @@ import {
1212} from 'state/utils/getClustersInfo' ;
1313import { TFunction } from 'i18next' ;
1414import { useFeature } from 'hooks/useFeature' ;
15- import { ConfigFeature } from 'state/types' ;
15+ import {
16+ ClusterStorage ,
17+ ConfigFeature ,
18+ configFeaturesNames ,
19+ } from 'state/types' ;
1620import { removePreviousPath } from 'state/useAfterInitHook' ;
1721import { configurationAtom } from 'state/configuration/configurationAtom' ;
18- import { ClusterStorage } from 'state/types' ;
1922import {
2023 KubeConfigMultipleState ,
2124 multipleContexts ,
@@ -155,7 +158,9 @@ const loadKubeconfigIdCluster = async (
155158export type KubeconfigIdHandleState = 'not started' | 'loading' | 'done' ;
156159
157160export function useLoginWithKubeconfigID ( ) {
158- const kubeconfigIdFeature = useFeature < KubeconfigIdFeature > ( 'KUBECONFIG_ID' ) ;
161+ const kubeconfigIdFeature = useFeature < KubeconfigIdFeature > (
162+ configFeaturesNames . KUBECONFIG_ID ,
163+ ) ;
159164 const configuration = useRecoilValue ( configurationAtom ) ;
160165 const clusters = useRecoilValue ( clustersState ) ;
161166 const [ contextsState , setContextsState ] = useRecoilState ( multipleContexts ) ;
@@ -238,7 +243,9 @@ export function useLoginWithKubeconfigID() {
238243}
239244
240245export function useLoadDefaultKubeconfigId ( ) {
241- const kubeconfigIdFeature = useFeature < KubeconfigIdFeature > ( 'KUBECONFIG_ID' ) ! ;
246+ const kubeconfigIdFeature = useFeature < KubeconfigIdFeature > (
247+ configFeaturesNames . KUBECONFIG_ID ,
248+ ) ! ;
242249 const clusters = useRecoilValue ( clustersState ) ;
243250 const { t } = useTranslation ( ) ;
244251 const clusterInfo = useClustersInfo ( ) ;
0 commit comments