refactor(app): move Tauri IPC bridge hooks (tauriBridge/) into app/ where the shell composes them

This commit is contained in:
Psychotoxical
2026-06-30 20:06:05 +02:00
parent 7ae259cacf
commit 79c02a93cf
11 changed files with 28 additions and 28 deletions
+12
View File
@@ -0,0 +1,12 @@
import { useEffect } from 'react';
import { invoke } from '@tauri-apps/api/core';
import { useAuthStore } from '@/store/authStore';
/** Sync tray-icon visibility with the user's stored setting. Runs once on mount
* (initial sync) and again whenever the setting changes. */
export function useTrayIconSync() {
const showTrayIcon = useAuthStore(s => s.showTrayIcon);
useEffect(() => {
invoke('toggle_tray_icon', { show: showTrayIcon }).catch(console.error);
}, [showTrayIcon]);
}