1 import PropTypes from 'prop-types';
2 import React from 'react';
3 import { ListGroup } from 'react-bootstrap';
4 import { withTranslation } from 'react-i18next';
6 import { getTranslation } from '../../helpers/Technique';
7 import i18n from '../../i18n';
9 const Outline = ({ technique }) => technique.chapters && technique.chapters.length ?
10 <aside className="tech-outline mb-3 ms-3">
12 {technique.chapters.map(chapter => chapter.pivot.level ?
15 href={`#c${chapter.id}`}
16 key={`c${chapter.id}`}
17 title={getTranslation(chapter, 'short', i18n.language) || null}
19 {getTranslation(chapter, 'title', i18n.language)}
27 technique: PropTypes.shape({
28 chapters: PropTypes.arrayOf(PropTypes.shape({
33 export default withTranslation()(Outline);