import { useQuery } from '@tanstack/react-query'; import { Suspense } from 'react'; import { useLibraryContext } from '@sd/client'; import { toast } from '@sd/ui'; import { Menu } from '~/components/Menu'; import { Platform, usePlatform } from '~/util/Platform'; import { ConditionalItem } from '../ConditionalItem'; import { useContextMenuContext } from '../context'; export default new ConditionalItem({ useCondition: () => { const { selectedFilePaths } = useContextMenuContext(); const { getFilePathOpenWithApps, openFilePathWith } = usePlatform(); if (!getFilePathOpenWithApps || !openFilePathWith) return null; if (selectedFilePaths.some((p) => p.is_dir)) return null; return { getFilePathOpenWithApps, openFilePathWith }; }, Component: ({ getFilePathOpenWithApps, openFilePathWith }) => (
No apps available
)} > ); };