fix: hide viewSourceContent on mobile (#1711)

This commit is contained in:
Whitewater 2024-11-22 20:04:06 +08:00 committed by GitHub
parent e730189f6b
commit 86caeb6df4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -1,3 +1,4 @@
import { isMobile } from "@follow/components/hooks/useMobile.js"
import type { FeedViewType } from "@follow/constants"
import type { ReactNode } from "react"
import { useCallback, useMemo } from "react"
@ -147,7 +148,7 @@ export const useEntryActions = ({ entryId, view }: { entryId: string; view?: Fee
{
id: COMMAND_ID.entry.viewSourceContent,
onClick: runCmdFn(COMMAND_ID.entry.viewSourceContent, [{ entryId }]),
hide: isShowSourceContent || !entry?.entries.url,
hide: isMobile() || isShowSourceContent || !entry?.entries.url,
},
{
id: COMMAND_ID.entry.viewEntryContent,