Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
"@plasmohq/storage": "^1.10.0",
"@tailwindcss/forms": "^0.5.10",
"classnames": "^2.5.1",
"configcat-js": "^9.6.0",
"configcat-react": "^4.9.0",

"lucide-react": "^0.474.0",
"plasmo": "^0.90.5",
"react": "^18.3.1",
Expand Down
32 changes: 1 addition & 31 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 7 additions & 9 deletions src/contents/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import cssText from "data-text:../button/button.css";
import type { PlasmoCSConfig, PlasmoGetInlineAnchor } from "plasmo";
import React, { type ReactElement } from "react";
import { EVENT_CURRENT_URL_CHANGED } from "~constants";
import { ConfigCatProvider, configCatProviderConfig } from "~hooks/use-configcat";

import { OnaButton } from "../button/button";
import { buttonContributions, isSiteSuitable, type ButtonContributionParams } from "../button/button-contributions";

Expand Down Expand Up @@ -41,14 +41,12 @@ class ButtonContributionManager {
if (!this.buttons.has(containerId)) {
this.buttons.set(
containerId,
<ConfigCatProvider {...configCatProviderConfig}>
<OnaButton
key={containerId}
application={contribution.application}
additionalClassNames={contribution.additionalClassNames}
urlTransformer={contribution.urlTransformer}
/>
</ConfigCatProvider>,
<OnaButton
key={containerId}
application={contribution.application}
additionalClassNames={contribution.additionalClassNames}
urlTransformer={contribution.urlTransformer}
/>,
);
}
}
Expand Down
34 changes: 0 additions & 34 deletions src/hooks/use-configcat.ts

This file was deleted.

8 changes: 2 additions & 6 deletions src/popup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { CheckboxInputField } from "~components/forms/CheckboxInputField";
import { InputField } from "~components/forms/InputField";
import { TextInput } from "~components/forms/TextInputField";
import { ALL_ORIGINS_WILDCARD, DEFAULT_ONA_ENDPOINT } from "~constants";
import { ConfigCatProvider, configCatProviderConfig } from "~hooks/use-configcat";

import { useTemporaryState } from "~hooks/use-temporary-state";
import {
STORAGE_AUTOMATICALLY_DETECT_GITPOD,
Expand Down Expand Up @@ -176,11 +176,7 @@ function PopupContent() {
}

function IndexPopup() {
return (
<ConfigCatProvider {...configCatProviderConfig}>
<PopupContent />
</ConfigCatProvider>
);
return <PopupContent />;
}

export default IndexPopup;
22 changes: 11 additions & 11 deletions test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@
"test": "cp ../src/button/button-contributions.ts ./src/button-contributions-copy.ts && tsc && mocha dist/**/*.spec.js"
},
"devDependencies": {
"@types/chai": "^4.3.6",
"@types/chrome": "0.0.243",
"@types/mocha": "^10.0.1",
"@types/node": "20.5.0",
"chai": "^4.3.8",
"htmlnano": "^2.0.4",
"mocha": "^10.2.0",
"prettier": "^3.0.3",
"puppeteer": "^21.1.1",
"ts-node": "^10.9.1",
"@types/chai": "^5.0.1",
"@types/chrome": "0.0.287",
"@types/mocha": "^10.0.7",
"@types/node": "20.14.5",
"chai": "^5.1.2",
"htmlnano": "2.0.3",
"mocha": "^11.1.0",
"prettier": "3.3.3",
"puppeteer": "^23.6.0",
"ts-node": "^10.9.2",
"source-map-support": "^0.5.21",
"typescript": "^5.2.2"
"typescript": "5.5.4"
}
}
Loading
Loading