Move some things around

This commit is contained in:
Gregory Schier
2023-03-08 23:20:15 -08:00
parent f4f438d9fe
commit bf8f12274f
19 changed files with 617 additions and 705 deletions

View File

@@ -1,5 +1,4 @@
import { useQuery, useQueryClient } from '@tanstack/react-query';
import { debounce } from 'lodash';
import { useEffect } from 'react';
import type { Appearance } from '../lib/theme/window';
import {
@@ -11,10 +10,6 @@ import {
const appearanceQueryKey = ['theme', 'appearance'];
const forceSetTheme = debounce((gray: string) => {
setAppearance(getAppearance(), gray);
}, 200);
export default function useTheme() {
const queryClient = useQueryClient();
const appearance = useQuery({
@@ -38,7 +33,6 @@ export default function useTheme() {
return {
appearance,
forceSetTheme,
toggleAppearance: handleToggleAppearance,
};
}