interface UseCardLinkResult

Returned by useCardLink to PlaylistCard, and through useDumpCardLink to DumpCard and JournalCard.

Properties

go: () => void

Opens the page in this tab, for a handler that would rather not play.

handledAsNewTab: (e: MouseEvent) => boolean

Opens the page in a new tab and returns true when e is a ctrl, cmd or shift click away from any anchor. A click handler that plays media calls it first, so that such a click opens the page instead.

cardProps: { onClick: (e: MouseEvent) => void; onMouseDown: (e: MouseEvent) => void; onAuxClick: (e: MouseEvent) => void; }

Spread onto the card element.

Usage

import { type UseCardLinkResult } from "src/hooks/shared/useCardLink.ts";