fix: remove duplicated shortcuts

Signed-off-by: Innei <i@innei.in>
This commit is contained in:
Innei
2024-07-31 17:06:17 +08:00
parent 38439050bb
commit bc3ecde2e2
2 changed files with 1 additions and 19 deletions
@@ -142,6 +142,7 @@ function EntryItemImpl({
useCallback(
(e) => {
e.preventDefault()
showNativeMenu(
[
...items
@@ -1,10 +1,8 @@
import { ActionButton } from "@renderer/components/ui/button"
import { shortcuts } from "@renderer/constants/shortcuts"
import { useEntryActions } from "@renderer/hooks/biz/useEntryActions"
import { cn } from "@renderer/lib/utils"
import { useEntry } from "@renderer/store/entry/hooks"
import { AnimatePresence, m } from "framer-motion"
import { useHotkeys } from "react-hotkeys-hook"
import { useEntryContentScrollToTop, useEntryTitleMeta } from "./atoms"
import { EntryReadHistory } from "./read-history"
@@ -25,23 +23,6 @@ export function EntryHeader({
entry,
})
useHotkeys(
shortcuts.entry.toggleStarred.key,
() => {
const key = entry?.collections ? "unstar" : "star"
items.find((item) => item.key === key)?.onClick()
},
{ scopes: ["home"] },
)
useHotkeys(
shortcuts.entry.openInBrowser.key,
() => {
items.find((item) => item.key === "openInBrowser")?.onClick()
},
{ scopes: ["home"] },
)
const entryTitleMeta = useEntryTitleMeta()
const isAtTop = useEntryContentScrollToTop()
const shouldShowMeta = !isAtTop && entryTitleMeta