Skip to content

Commit b7c36ee

Browse files
committed
refactor: remove unused package theme-change
1 parent ea6db24 commit b7c36ee

File tree

3 files changed

+3
-12
lines changed

3 files changed

+3
-12
lines changed

package-lock.json

Lines changed: 1 addition & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818
"@sentry/react": "^8.27.0",
1919
"react": "^18.3.1",
2020
"react-dom": "^18.3.1",
21-
"react-helmet-async": "^2.0.5",
22-
"theme-change": "^2.5.0"
21+
"react-helmet-async": "^2.0.5"
2322
},
2423
"devDependencies": {
2524
"@loadable/component": "^5.16.4",

web/src/components/top-bar.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { useAppSelector } from "src/redux/store";
1212
import { stripLanguageCodeFromHRef } from "src/utils/website-language";
1313
import { useSearchModal } from "src/utils/search-modal";
1414
import { Language, LANGUAGES } from "@dzcode.io/models/dist/language";
15-
import { themeChange } from "theme-change";
15+
1616
export interface TopBarProps {
1717
version: string;
1818
links: Array<{ localeKey: DictionaryKeys<"navbar-section">; href: string }>;
@@ -48,7 +48,6 @@ export function TopBar({ version, links }: TopBarProps): JSX.Element {
4848
});
4949

5050
useLayoutEffect(() => {
51-
themeChange(true);
5251
const theme = localStorage.getItem("theme");
5352
if (theme) {
5453
document.documentElement.setAttribute("data-theme", theme);

0 commit comments

Comments
 (0)