Skip to content

Commit 4e84196

Browse files
committed
fix: sidebar copy feed url, fixed #1361
Signed-off-by: Innei <tukon479@gmail.com>
1 parent cb6a65b commit 4e84196

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

apps/renderer/src/hooks/biz/useFeedActions.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ export const useFeedActions = ({
6565
type: feed.type,
6666
ownerUserId: feed.ownerUserId,
6767
id: feed.id,
68+
url: feed.url,
69+
siteUrl: feed.siteUrl,
6870
}
6971
})
7072
const inbox = useInboxById(feedId)
@@ -273,10 +275,10 @@ export const useFeedActions = ({
273275
disabled: isEntryList,
274276
shortcut: "Meta+C",
275277
click: () => {
276-
// @ts-expect-error
277-
const { url } = feed || {}
278-
if (!url) return
279-
navigator.clipboard.writeText(url)
278+
const { url, siteUrl } = feed || {}
279+
const copied = url || siteUrl
280+
if (!copied) return
281+
navigator.clipboard.writeText(copied)
280282
},
281283
},
282284
{

0 commit comments

Comments
 (0)