From 725f81c165e727e8a363ba2a2fa7a142e566cae7 Mon Sep 17 00:00:00 2001 From: ousugo Date: Mon, 20 Jan 2025 00:03:51 +0800 Subject: [PATCH] fix: conditionally render pin button based on app ID --- src/renderer/src/components/MinApp/index.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/renderer/src/components/MinApp/index.tsx b/src/renderer/src/components/MinApp/index.tsx index f781eb1f..55659193 100644 --- a/src/renderer/src/components/MinApp/index.tsx +++ b/src/renderer/src/components/MinApp/index.tsx @@ -31,6 +31,7 @@ const PopupContainer: React.FC = ({ app, resolve }) => { useBridge() const canOpenExternalLink = app.url.startsWith('http://') || app.url.startsWith('https://') + const canPinned = !!app.id const onClose = async (_delay = 0.3) => { setOpen(false) @@ -63,9 +64,11 @@ const PopupContainer: React.FC = ({ app, resolve }) => { - + {canPinned && ( + + )} {canOpenExternalLink && (