@@ -7,7 +7,7 @@ import { Button } from "~components/forms/Button";
7
7
import { CheckboxInputField } from "~components/forms/CheckboxInputField" ;
8
8
import { InputField } from "~components/forms/InputField" ;
9
9
import { TextInput } from "~components/forms/TextInputField" ;
10
- import { ALL_ORIGINS_WILDCARD , DEFAULT_GITPOD_ENDPOINT } from "~constants" ;
10
+ import { ALL_ORIGINS_WILDCARD , DEFAULT_GITPOD_ENDPOINT , DEFAULT_ONA_ENDPOINT } from "~constants" ;
11
11
import { ConfigCatProvider , configCatProviderConfig , FeatureFlags , useFlag } from "~hooks/use-configcat" ;
12
12
import { useTemporaryState } from "~hooks/use-temporary-state" ;
13
13
import {
@@ -33,13 +33,12 @@ const Animate = ({ children, on }: PropsWithChildren<{ on?: string }>) => {
33
33
34
34
function PopupContent ( ) {
35
35
const [ error , setError ] = useState < string > ( ) ;
36
-
36
+
37
37
const [ storedAddress ] = useStorage < string > ( STORAGE_KEY_ADDRESS , DEFAULT_GITPOD_ENDPOINT ) ;
38
38
const [ address , setAddress ] = useState < string > ( storedAddress ) ;
39
39
const [ justSaved , setJustSaved ] = useTemporaryState ( false , 2000 ) ;
40
-
40
+
41
41
const { value : isOnaEnabled } = useFlag ( FeatureFlags . ONA_ENABLED , false ) ;
42
- // const isOnaEnabled = true;
43
42
44
43
const updateAddress = useCallback (
45
44
( e : FormEvent ) => {
@@ -103,7 +102,7 @@ function PopupContent() {
103
102
< form className = "w-full" onSubmit = { updateAddress } action = "#" >
104
103
< InputField
105
104
label = { `${ isOnaEnabled ? "Ona" : "Gitpod" } URL` }
106
- hint = { `${ isOnaEnabled ? "Ona" : "Gitpod" } instance URL, e.g., ${ DEFAULT_GITPOD_ENDPOINT } .` }
105
+ hint = { `${ isOnaEnabled ? "Ona" : "Gitpod" } instance URL, e.g., ${ isOnaEnabled ? DEFAULT_ONA_ENDPOINT : DEFAULT_GITPOD_ENDPOINT } .` }
107
106
topMargin = { false }
108
107
>
109
108
< div className = "flex w-full h-10 max-w-sm items-center space-x-2" >
@@ -150,7 +149,7 @@ function PopupContent() {
150
149
/>
151
150
< CheckboxInputField
152
151
label = "Automatic instance hopping"
153
- hint = { `Changes the ${ isOnaEnabled ? "Ona" : "Gitpod" } URL automatically when a${ isOnaEnabled ? "n Ona" : "Gitpod" } instance is detected` }
152
+ hint = { `Changes the ${ isOnaEnabled ? "Ona" : "Gitpod" } URL automatically when a${ isOnaEnabled ? "n Ona" : " Gitpod" } instance is detected` }
154
153
checked = { enableInstanceHopping }
155
154
onChange = { setEnableInstanceHopping }
156
155
/>
0 commit comments