Skip to content

Commit 4a89645

Browse files
easyCZona-agent
andcommitted
Remove ConfigCat feature flag and default to Ona behavior
- Remove configcat-js and configcat-react dependencies - Delete src/hooks/use-configcat.ts - Remove ConfigCatProvider wrappers from popup and button components - Default to Ona branding and behavior (previously behind is_ona_browser_extension_enabled flag) Co-authored-by: Ona <[email protected]>
1 parent aa31780 commit 4a89645

File tree

4 files changed

+10
-51
lines changed

4 files changed

+10
-51
lines changed

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@
2020
"@plasmohq/storage": "^1.10.0",
2121
"@tailwindcss/forms": "^0.5.10",
2222
"classnames": "^2.5.1",
23-
"configcat-js": "^9.6.0",
24-
"configcat-react": "^4.9.0",
23+
2524
"lucide-react": "^0.474.0",
2625
"plasmo": "^0.90.5",
2726
"react": "^18.3.1",

src/contents/button.tsx

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import cssText from "data-text:../button/button.css";
22
import type { PlasmoCSConfig, PlasmoGetInlineAnchor } from "plasmo";
33
import React, { type ReactElement } from "react";
44
import { EVENT_CURRENT_URL_CHANGED } from "~constants";
5-
import { ConfigCatProvider, configCatProviderConfig } from "~hooks/use-configcat";
5+
66
import { OnaButton } from "../button/button";
77
import { buttonContributions, isSiteSuitable, type ButtonContributionParams } from "../button/button-contributions";
88

@@ -41,14 +41,12 @@ class ButtonContributionManager {
4141
if (!this.buttons.has(containerId)) {
4242
this.buttons.set(
4343
containerId,
44-
<ConfigCatProvider {...configCatProviderConfig}>
45-
<OnaButton
46-
key={containerId}
47-
application={contribution.application}
48-
additionalClassNames={contribution.additionalClassNames}
49-
urlTransformer={contribution.urlTransformer}
50-
/>
51-
</ConfigCatProvider>,
44+
<OnaButton
45+
key={containerId}
46+
application={contribution.application}
47+
additionalClassNames={contribution.additionalClassNames}
48+
urlTransformer={contribution.urlTransformer}
49+
/>,
5250
);
5351
}
5452
}

src/hooks/use-configcat.ts

Lines changed: 0 additions & 34 deletions
This file was deleted.

src/popup.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { CheckboxInputField } from "~components/forms/CheckboxInputField";
88
import { InputField } from "~components/forms/InputField";
99
import { TextInput } from "~components/forms/TextInputField";
1010
import { ALL_ORIGINS_WILDCARD, DEFAULT_ONA_ENDPOINT } from "~constants";
11-
import { ConfigCatProvider, configCatProviderConfig } from "~hooks/use-configcat";
11+
1212
import { useTemporaryState } from "~hooks/use-temporary-state";
1313
import {
1414
STORAGE_AUTOMATICALLY_DETECT_GITPOD,
@@ -176,11 +176,7 @@ function PopupContent() {
176176
}
177177

178178
function IndexPopup() {
179-
return (
180-
<ConfigCatProvider {...configCatProviderConfig}>
181-
<PopupContent />
182-
</ConfigCatProvider>
183-
);
179+
return <PopupContent />;
184180
}
185181

186182
export default IndexPopup;

0 commit comments

Comments
 (0)