Stirling-PDF/frontend/src/core/hooks/useShouldShowWelcomeModal.ts
James Brunton d2b38ef4b8
Restructure frontend code to allow for extensions (#4721)
# Description of Changes
Move frontend code into `core` folder and add infrastructure for
`proprietary` folder to include premium, non-OSS features
2025-10-28 10:29:36 +00:00

12 lines
381 B
TypeScript

import { useMediaQuery } from '@mantine/hooks';
import { usePreferences } from '@app/contexts/PreferencesContext';
export function useShouldShowWelcomeModal(): boolean {
const { preferences } = usePreferences();
const isMobile = useMediaQuery("(max-width: 1024px)");
return !preferences.hasCompletedOnboarding
&& preferences.toolPanelModePromptSeen
&& !isMobile;
}