import PropTypes from 'prop-types';
import React from 'react';
import { ListGroup } from 'react-bootstrap';
+import { withTranslation } from 'react-i18next';
+
+import { getTranslation } from '../../helpers/Technique';
+import i18n from '../../i18n';
const Outline = ({ technique }) => technique.chapters && technique.chapters.length ?
<aside className="tech-outline mb-3 ms-3">
action
href={`#c${chapter.id}`}
key={`c${chapter.id}`}
- title={chapter.short || null}
+ title={getTranslation(chapter, 'short', i18n.language) || null}
>
- {chapter.title}
+ {getTranslation(chapter, 'title', i18n.language)}
</ListGroup.Item>
: null)}
</ListGroup>
}),
};
-export default Outline;
+export default withTranslation()(Outline);