import React from 'react'; import PropTypes from 'prop-types'; import { Button, Panel } from '@freecodecamp/react-bootstrap'; import { useTranslation } from 'react-i18next'; import { FullWidthRow } from '../helpers'; import SectionHeader from './SectionHeader'; import HonestyPolicy from '../../resources/honesty-policy'; import './honesty.css'; const propTypes = { isHonest: PropTypes.bool, updateIsHonest: PropTypes.func.isRequired }; const Honesty = ({ isHonest, updateIsHonest }) => { const { t } = useTranslation(); const button = isHonest ? ( ) : ( ); return (
{t('settings.headings.honesty')}
{button}
); }; Honesty.displayName = 'Honesty'; Honesty.propTypes = propTypes; export default Honesty;