1 import PropTypes from 'prop-types';
2 import React from 'react';
3 import { Button } from 'react-bootstrap';
4 import { useTranslation } from 'react-i18next';
6 import Icon from '../common/Icon';
7 import RawHTML from '../common/RawHTML';
8 import { getTranslation } from '../../helpers/Technique';
9 import i18n from '../../i18n';
11 const Detail = ({ actions, event }) => {
12 const { t } = useTranslation();
15 <div className="d-flex align-items-center justify-content-between">
17 {(event.description && getTranslation(event.description, 'title', i18n.language))
20 {event.description && actions.editContent ?
23 onClick={() => actions.editContent(event.description)}
25 title={t('button.edit')}
26 variant="outline-secondary"
28 <Icon.EDIT title="" />
33 <RawHTML html={getTranslation(event.description, 'description', i18n.language)} />
39 actions: PropTypes.shape({
40 editContent: PropTypes.func,
42 event: PropTypes.shape({
43 description: PropTypes.shape({
45 title: PropTypes.string,
49 export default Detail;