From 52bd2b6aee740a4069fdaf937d0bc4ebb8021853 Mon Sep 17 00:00:00 2001 From: MaheshtheDev <38828053+MaheshtheDev@users.noreply.github.com> Date: Mon, 18 May 2026 05:32:04 +0000 Subject: [PATCH] feat(web): pwa prompt 'Add to Home Screen' opens share menu (#963) --- apps/web/components/pwa-install-prompt.tsx | 27 ++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/apps/web/components/pwa-install-prompt.tsx b/apps/web/components/pwa-install-prompt.tsx index 89bf3e4ed..6d946560c 100644 --- a/apps/web/components/pwa-install-prompt.tsx +++ b/apps/web/components/pwa-install-prompt.tsx @@ -214,7 +214,20 @@ export function PWAInstallPrompt() { dismiss() }, [nativePrompt, dismiss]) + const openShareMenu = useCallback(async () => { + try { + if (typeof navigator !== "undefined" && "share" in navigator) { + await navigator.share({ + title: "Supermemory", + url: window.location.href, + }) + } + } catch {} + dismiss() + }, [dismiss]) + const canNativeInstall = !!nativePrompt && device.isAndroid && device.isChrome + const canShare = typeof navigator !== "undefined" && "share" in navigator const steps = buildSteps(device) return ( @@ -347,10 +360,20 @@ export function PWAInstallPrompt() {