X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/c324b64f3b26e79b4640b6f0cf55671f1a261bca..44cbbc08d7a5b559a542bbf6491a05467de1c15c:/src/views/collection-panel/collection-panel.tsx diff --git a/src/views/collection-panel/collection-panel.tsx b/src/views/collection-panel/collection-panel.tsx index 8e46385cc9..0b264b6bab 100644 --- a/src/views/collection-panel/collection-panel.tsx +++ b/src/views/collection-panel/collection-panel.tsx @@ -16,7 +16,6 @@ import { DetailsAttribute } from '~/components/details-attribute/details-attribu import { CollectionResource } from '~/models/collection'; import { CollectionPanelFiles } from '~/views-components/collection-panel-files/collection-panel-files'; import * as CopyToClipboard from 'react-copy-to-clipboard'; -import { TagResource } from '~/models/tag'; import { CollectionTagForm } from './collection-tag-form'; import { deleteCollectionTag } from '~/store/collection-panel/collection-panel-action'; import { snackbarActions } from '~/store/snackbar/snackbar-actions'; @@ -55,7 +54,6 @@ const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ interface CollectionPanelDataProps { item: CollectionResource; - tags: TagResource[]; } type CollectionPanelProps = CollectionPanelDataProps & DispatchProp @@ -66,13 +64,12 @@ export const CollectionPanel = withStyles(styles)( connect((state: RootState, props: RouteComponentProps<{ id: string }>) => { const collection = getResource(props.match.params.id)(state.resources); return { - item: collection, - tags: state.collectionPanel.tags + item: collection }; })( class extends React.Component { render() { - const { classes, item, tags } = this.props; + const { classes, item } = this.props; return
{ - tags.map(tag => { - return ; + Object.keys(item.properties).map( key => { + return ; }) } @@ -147,8 +144,8 @@ export const CollectionPanel = withStyles(styles)( this.props.dispatch(openContextMenu(event, resource)); } - handleDelete = (uuid: string) => () => { - this.props.dispatch(deleteCollectionTag(uuid)); + handleDelete = (key: string) => () => { + this.props.dispatch(deleteCollectionTag(key)); } onCopy = () => { @@ -160,8 +157,3 @@ export const CollectionPanel = withStyles(styles)( } ) ); - -const renderTagLabel = (tag: TagResource) => { - const { properties } = tag; - return `${properties.key}: ${properties.value}`; -};