Skip to content

Commit 63b72d5

Browse files
committed
revert default endpoint change
1 parent cde49d9 commit 63b72d5

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/constants.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
export const DEFAULT_GITPOD_ENDPOINT = "https://app.ona.com";
1+
export const DEFAULT_GITPOD_ENDPOINT = "https://gitpod.io";
2+
export const DEFAULT_ONA_ENDPOINT = "https://app.ona.com";
23
export const ALL_ORIGINS_WILDCARD = "*://*/*";
34
export const EVENT_CURRENT_URL_CHANGED = "current-url-changed";

src/popup.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { Button } from "~components/forms/Button";
77
import { CheckboxInputField } from "~components/forms/CheckboxInputField";
88
import { InputField } from "~components/forms/InputField";
99
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";
1111
import { ConfigCatProvider, configCatProviderConfig, FeatureFlags, useFlag } from "~hooks/use-configcat";
1212
import { useTemporaryState } from "~hooks/use-temporary-state";
1313
import {
@@ -33,13 +33,12 @@ const Animate = ({ children, on }: PropsWithChildren<{ on?: string }>) => {
3333

3434
function PopupContent() {
3535
const [error, setError] = useState<string>();
36-
36+
3737
const [storedAddress] = useStorage<string>(STORAGE_KEY_ADDRESS, DEFAULT_GITPOD_ENDPOINT);
3838
const [address, setAddress] = useState<string>(storedAddress);
3939
const [justSaved, setJustSaved] = useTemporaryState(false, 2000);
40-
40+
4141
const { value: isOnaEnabled } = useFlag(FeatureFlags.ONA_ENABLED, false);
42-
// const isOnaEnabled = true;
4342

4443
const updateAddress = useCallback(
4544
(e: FormEvent) => {
@@ -103,7 +102,7 @@ function PopupContent() {
103102
<form className="w-full" onSubmit={updateAddress} action="#">
104103
<InputField
105104
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}.`}
107106
topMargin={false}
108107
>
109108
<div className="flex w-full h-10 max-w-sm items-center space-x-2">
@@ -150,7 +149,7 @@ function PopupContent() {
150149
/>
151150
<CheckboxInputField
152151
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`}
154153
checked={enableInstanceHopping}
155154
onChange={setEnableInstanceHopping}
156155
/>

0 commit comments

Comments
 (0)