Files
wehub-resource-sync 2114b14ee0
Sync main into demo / sync (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:35:26 +08:00

12 lines
394 B
TypeScript

import { useMemo } from 'react';
import { useWechatReadingStore } from '../state';
import { resolveReaderTheme } from '../utils/readerTheme';
export function useReaderTheme() {
const readerPrefs = useWechatReadingStore(s => s.readerPrefs);
return useMemo(
() => resolveReaderTheme(readerPrefs.themeColor, readerPrefs.themeBg),
[readerPrefs.themeColor, readerPrefs.themeBg],
);
}