mirror of
https://github.com/amitwh/markdown-converter.git
synced 2026-08-02 18:10:18 +05:30
16 lines
451 B
TypeScript
16 lines
451 B
TypeScript
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');
|
|
}
|
|
}, []);
|
|
}
|