Skip to content
This repository was archived by the owner on May 7, 2026. It is now read-only.

Commit 9e4be8f

Browse files
committed
refactor(ThemeToggle): remove console logs and improve type annotation in useTask
1 parent 3699f57 commit 9e4be8f

3 files changed

Lines changed: 1 addition & 7 deletions

File tree

packages/ui/src/components/ThemeToggle/ThemeToggle.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ export const ThemeToggle = component$(() => {
6666
const themeValue = createSignal(getTheme());
6767
const onClick$ = event$(() => {
6868
let newTheme = getTheme();
69-
console.log('Theme changed to:', newTheme);
7069
if (newTheme === 'dark') {
7170
newTheme = 'light';
7271
setTheme(newTheme);
@@ -79,8 +78,6 @@ export const ThemeToggle = component$(() => {
7978
: 'dark';
8079
setTheme(newTheme);
8180
}
82-
console.log('New theme set:', newTheme);
83-
8481
themeValue.value = newTheme;
8582
});
8683

packages/ui/src/components/ThemeToggle/theme-script.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@ export const ThemeScript = () => {
44
const themeScript = `
55
try {
66
const getItem = localStorage.getItem('${themeStorageKey}')
7-
console.log(1111, getItem)
87
if(getItem === 'light' || getItem === 'dark'){
98
document.firstElementChild.setAttribute('data-theme', getItem);
109
}
11-
1210
} catch (err) { }`;
1311
return <script dangerouslySetInnerHTML={themeScript} />;
1412
};

packages/ui/src/devtools.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ export const QwikDevtools = component$(() => {
5858
routes: undefined,
5959
});
6060

61-
// eslint-disable-next-line qwik/no-use-visible-task
62-
useTask$(async ({ track }) => {
61+
useTask$(async ({ track }: any) => {
6362
if (isBrowser) {
6463
const hot = await tryCreateHotContext(undefined, ['/']);
6564

0 commit comments

Comments
 (0)