diff --git a/src/renderer/src/hooks/biz/useEntryActions.tsx b/src/renderer/src/hooks/biz/useEntryActions.tsx index 67c333ca9..c9bb228c1 100644 --- a/src/renderer/src/hooks/biz/useEntryActions.tsx +++ b/src/renderer/src/hooks/biz/useEntryActions.tsx @@ -27,8 +27,7 @@ export const useCollect = (entry: Nullable) => export const useUnCollect = (entry: Nullable) => useMutation({ mutationFn: async () => - entry && - entryActions.markStar(entry.entries.id, false), + entry && entryActions.markStar(entry.entries.id, false), onSuccess: () => { toast.success("Unstarred.", { @@ -179,9 +178,18 @@ export const useEntryActions = ({ { name: "Share", className: "i-mgc-share-forward-cute-re", + disabled: + !window.electron || !navigator.share, onClick: () => { if (!populatedEntry.entries.url) return - tipcClient?.showShareMenu(populatedEntry.entries.url) + + if (window.electron) { + return tipcClient?.showShareMenu(populatedEntry.entries.url) + } else { + navigator.share({ + url: populatedEntry.entries.url, + }) + } }, }, {