UserSettings.jsx 941 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import React from 'react';
  2. import PropTypes from 'prop-types';
  3. import { useTranslation } from 'react-i18next';
  4. import BasicInfoSettings from './BasicInfoSettings';
  5. import ProfileImageSettings from './ProfileImageSettings';
  6. class UserSettings extends React.Component {
  7. render() {
  8. const { t } = this.props;
  9. return (
  10. <div data-testid="grw-user-settings">
  11. <div className="mb-5">
  12. <h2 className="border-bottom my-4">{t('Basic Info')}</h2>
  13. <BasicInfoSettings />
  14. </div>
  15. <div className="mb-5">
  16. <h2 className="border-bottom my-4">{t('Set Profile Image')}</h2>
  17. <ProfileImageSettings />
  18. </div>
  19. </div>
  20. );
  21. }
  22. }
  23. UserSettings.propTypes = {
  24. t: PropTypes.func.isRequired, // i18next
  25. };
  26. const UserSettingsWrapperFC = (props) => {
  27. const { t } = useTranslation();
  28. return <UserSettings t={t} {...props} />;
  29. };
  30. export default UserSettingsWrapperFC;