1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import copy from 'copy-to-clipboard';
6 import { getResourceUrl } from 'routes/routes';
7 import { getClipboardUrl } from 'views-components/context-menu/actions/helpers';
9 export const openInNewTabAction = (resource: any) => () => {
10 const url = getResourceUrl(resource.uuid);
13 window.open(`${window.location.origin}${url}`, '_blank');
17 export const copyToClipboardAction = (resource: any) => () => {
18 const url = getResourceUrl(resource.uuid);
21 copy(getClipboardUrl(url, false));