1 import PropTypes from 'prop-types';
2 import React from 'react';
3 import { Card, ListGroup } from 'react-bootstrap';
4 import { Link } from 'react-router-dom';
12 } from '../../helpers/Technique';
13 import i18n from '../../i18n';
15 const Popover = ({ show, technique }) =>
16 <div className={`map-popover ${show ? 'shown' : 'hidden'}`}>
20 {getTranslation(technique, 'title', i18n.language)}
26 {getTranslation(technique, 'short', i18n.language)}
30 {hasRelations(technique, 'related') ?
31 <ListGroup variant="flush">
32 {sorted(getRelations(technique, 'related')).map(r =>
35 title={getTranslation(r, 'short', i18n.language)}
37 <Link to={getLink(r)}>
38 {getTranslation(r, 'title', i18n.language)}
49 technique: PropTypes.shape({
50 short: PropTypes.string,
54 export default Popover;