feat(renderer): mount ModalLayer + first-launch welcome trigger

This commit is contained in:
2026-06-05 19:48:37 +05:30
parent 9d154a8521
commit b39bdcf475
2 changed files with 25 additions and 3 deletions
+15
View File
@@ -0,0 +1,15 @@
import { useEffect } from 'react';
import { useAppStore } from '@/stores/app-store';
import { useSettingsStore } from '@/stores/settings-store';
/**
* On first mount, if the user hasn't dismissed the welcome dialog, open it.
* Call once at the top of App.tsx.
*/
export function useWelcomeTrigger() {
useEffect(() => {
if (!useSettingsStore.getState().welcomeDismissed) {
useAppStore.getState().openModal('welcome');
}
}, []);
}