diff -r 000000000000 -r 5f4fcbc80b37 clientjs/packages/dashboard-components/src/ui/TermEntry.jsx
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/clientjs/packages/dashboard-components/src/ui/TermEntry.jsx Fri Sep 14 17:57:34 2018 +0200
@@ -0,0 +1,84 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+import { NavLink } from 'react-router-dom';
+import { FormattedMessage, injectIntl, intlShape } from 'react-intl';
+import md5 from 'md5';
+
+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
+
+import './TermEntry.scss';
+
+
+function getTermDefinition(annotation) {
+ if (annotation.text) {
+ return annotation.text;
+ }
+
+ let selector;
+
+ if (annotation.target[0].selector) {
+ selector = annotation.target[0].selector.find(s => s.type === 'TextQuoteSelector');
+ }
+
+ if (selector) {
+ return selector.exact;
+ }
+ return '';
+}
+
+const TermEntry = ({ term, termDef, intl }) => {
+ const key = `${md5(term)}-term-entry`;
+
+ let firstDefinition = '';
+
+ if (termDef.definitions.length > 0) {
+ firstDefinition = getTermDefinition(termDef.definitions[0]);
+ }
+ if (!firstDefinition) {
+ firstDefinition =
{firstDefinition}
+
+
+