Files
outline/app/hooks/useShareMenuActions.tsx
T
Tom MoorandClaude Opus 5 2cc0d60ed8 feat: Multi-select in the shares settings table (#13360)
Revoking a share link now operates on every active share, so it can be
performed from the bulk selection toolbar as well as the row menu. The
copy link and go to source actions read their share from the action
context too, and hide when a multi-selection is active.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-08 22:16:20 -04:00

24 lines
622 B
TypeScript

import { useMemo } from "react";
import { ActionSeparator } from "~/actions";
import {
copyShareUrl,
goToShareSource,
revokeShare,
} from "~/actions/definitions/shares";
import { useMenuAction } from "~/hooks/useMenuAction";
/**
* Hook that constructs the action menu for share management operations. The
* share is read from the active models in the action context.
*
* @returns action with children for use in menus.
*/
export function useShareMenuActions() {
const actions = useMemo(
() => [copyShareUrl, goToShareSource, ActionSeparator, revokeShare],
[]
);
return useMenuAction(actions);
}