mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-24 18:31:16 +01:00
Move some things around
This commit is contained in:
@@ -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,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user