File tree 2 files changed +6
-16
lines changed
packages/forklift-console-plugin/src 2 files changed +6
-16
lines changed Original file line number Diff line number Diff line change 1
- import React from 'react' ;
2
- import { Namespace , useForkliftTranslation } from 'src/utils' ;
1
+ import React , { FC , ReactNode } from 'react' ;
2
+ import { useForkliftTranslation } from 'src/utils' ;
3
3
4
4
import { FormGroupWithHelpText , TypeaheadSelect , TypeaheadSelectOption } from '@kubev2v/common' ;
5
5
import {
@@ -15,10 +15,10 @@ interface ProjectNameSelectProps {
15
15
options : TypeaheadSelectOption [ ] ;
16
16
onSelect : ( value : string ) => void ;
17
17
isDisabled ?: boolean ;
18
- popoverHelpContent ?: React . ReactNode ;
18
+ popoverHelpContent ?: ReactNode ;
19
19
}
20
20
21
- export const ProjectNameSelect : React . FC < ProjectNameSelectProps > = ( {
21
+ export const ProjectNameSelect : FC < ProjectNameSelectProps > = ( {
22
22
value,
23
23
options,
24
24
isDisabled,
@@ -27,15 +27,6 @@ export const ProjectNameSelect: React.FC<ProjectNameSelectProps> = ({
27
27
} ) => {
28
28
const { t } = useForkliftTranslation ( ) ;
29
29
30
- // Fallback to "default" when the initial value does not exist within options
31
- React . useEffect ( ( ) => {
32
- const hasOptionValue = options . find ( ( option ) => option . name === value ) ;
33
-
34
- if ( ! hasOptionValue ) {
35
- onSelect ( Namespace . Default ) ;
36
- }
37
- } , [ ] ) ;
38
-
39
30
return (
40
31
< FormGroupWithHelpText
41
32
label = { t ( 'Project' ) }
Original file line number Diff line number Diff line change @@ -2,15 +2,14 @@ import { Namespace } from './constants';
2
2
import { isUpstream } from './env' ;
3
3
4
4
/**
5
- * When using an upstream build, use the env default namespace
6
- * with a fallback of 'default', otherwise use 'openshift-mtv'.
5
+ * When using an upstream build use 'konveyor-forklift', otherwise 'openshift-mtv'.
7
6
* @returns string
8
7
*/
9
8
export const getDefaultNamespace = ( ) : string => {
10
9
const isUserUpstream = isUpstream ( ) ;
11
10
12
11
if ( isUserUpstream ) {
13
- return process . env . DEFAULT_NAMESPACE || Namespace . Default ;
12
+ return Namespace . KonveyorForklift ;
14
13
}
15
14
16
15
return Namespace . OpenshiftMtv ;
You can’t perform that action at this time.
0 commit comments