use windowSettingsAtom (#993)

This commit is contained in:
Mike Sawka 2024-10-09 10:49:25 -07:00 committed by GitHub
parent 9173e51756
commit d4f86f3a2f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -85,7 +85,8 @@ function handleContextMenu(e: React.MouseEvent<HTMLDivElement>) {
} }
function AppSettingsUpdater() { function AppSettingsUpdater() {
const windowSettings = useSettingsPrefixAtom("window"); const windowSettingsAtom = useSettingsPrefixAtom("window");
const windowSettings = jotai.useAtomValue(windowSettingsAtom);
React.useEffect(() => { React.useEffect(() => {
const isTransparentOrBlur = const isTransparentOrBlur =
(windowSettings?.["window:transparent"] || windowSettings?.["window:blur"]) ?? false; (windowSettings?.["window:transparent"] || windowSettings?.["window:blur"]) ?? false;