diff --git a/apps/tauri/src/deeplinkHandler.tsx b/apps/tauri/src/deeplinkHandler.tsx index 36def6d..1053ea3 100644 --- a/apps/tauri/src/deeplinkHandler.tsx +++ b/apps/tauri/src/deeplinkHandler.tsx @@ -7,6 +7,7 @@ import { } from "react"; import { getCurrent, onOpenUrl } from "@tauri-apps/plugin-deep-link"; import { isTauri } from "@tauri-apps/api/core"; +import { useIsMobile } from "@tensamin/ui"; type DeeplinkContextValue = { deeplinks: readonly string[]; @@ -31,10 +32,10 @@ export default function DeeplinkProvider({ children: ReactNode; }) { const [deeplinks, setDeeplinks] = useState([]); - const isTauriEnv = isTauri(); + const isMobile = useIsMobile(); useEffect(() => { - if (!isTauriEnv) return; + if (!isTauri() || !isMobile) return; let mounted = true; let unlisten: (() => void) | undefined; @@ -57,7 +58,7 @@ export default function DeeplinkProvider({ mounted = false; unlisten?.(); }; - }, [isTauriEnv]); + }, [isMobile]); return ( )} - + ); diff --git a/apps/web/src/components/screens/login/form.tsx b/apps/web/src/components/screens/login/form.tsx index f275840..e318c4b 100644 --- a/apps/web/src/components/screens/login/form.tsx +++ b/apps/web/src/components/screens/login/form.tsx @@ -1,4 +1,4 @@ -import { Button, cn } from "@tensamin/ui"; +import { Button, cn, useIsMobile } from "@tensamin/ui"; import { Input } from "@tensamin/ui"; import { Label } from "@tensamin/ui"; import { useStorage } from "@tensamin/storage/context"; @@ -84,6 +84,7 @@ function parseTuFileContent(rawFileContent: string): { } export default function Form() { + const isMobile = useIsMobile(); const uploadRef = React.useRef(null); const [isDragging, setIsDragging] = React.useState(false); const { save } = useStorage(); @@ -266,7 +267,7 @@ export default function Form() { return (
- {isTauri() ? ( + {isTauri() && isMobile ? ( <> {