import { CollectionResource } from '../../models/collection';
import * as CopyToClipboard from 'react-copy-to-clipboard';
import { createCollectionTag } from '../../store/collection-panel/collection-panel-action';
-import { LinkResource } from '../../models/link';
+import { TagResource } from '../../models/tag';
type CssRules = 'card' | 'iconHeader' | 'tag' | 'copyIcon';
interface CollectionPanelDataProps {
item: CollectionResource;
- tags: LinkResource[];
+ tags: TagResource[];
}
interface CollectionPanelActionProps {
// Temporary method to add new tag
addTag = () => {
- this.props.dispatch<any>(createCollectionTag(this.props.item.uuid, 'dodalem nowy'));
+ this.props.dispatch<any>(createCollectionTag(this.props.item.uuid, { key: 'test', value: 'value for tag'}));
}
componentWillReceiveProps({ match, item, onItemRouteChange }: CollectionPanelProps) {
)
);
-const renderTagLabel = (tag: LinkResource) => {
+const renderTagLabel = (tag: TagResource) => {
const { properties } = tag;
return `${properties.key}: ${properties.value}`;
};
\ No newline at end of file