diff --git a/src/web/components/dialog/composercontent.jsx b/src/web/components/dialog/composercontent.jsx
index 3c0fc46b60..e5401b04e1 100644
--- a/src/web/components/dialog/composercontent.jsx
+++ b/src/web/components/dialog/composercontent.jsx
@@ -20,19 +20,15 @@ import React from 'react';
import styled from 'styled-components';
-import _ from 'gmp/locale';
-
import {NO_VALUE, YES_VALUE} from 'gmp/parser';
import PropTypes from 'web/utils/proptypes';
+import Theme from 'web/utils/theme';
import CheckBox from 'web/components/form/checkbox';
import FormGroup from 'web/components/form/formgroup';
-import Divider from 'web/components/layout/divider';
-import Layout from 'web/components/layout/layout';
-
-import Theme from 'web/utils/theme';
+import useTranslation from 'web/hooks/useTranslation';
export const COMPOSER_CONTENT_DEFAULTS = {
includeNotes: YES_VALUE,
@@ -52,20 +48,24 @@ const FilterField = styled.div`
`;
const ComposerContent = ({
- filterFieldTitle = _(
- 'To change the filter, please filter your results on the report page. This filter will not be stored as default.',
- ),
+ filterFieldTitle,
filterString,
includeNotes,
includeOverrides,
onValueChange,
-}) => (
-
-
- {filterString}
-
-
-
+}) => {
+ const [_] = useTranslation();
+ filterFieldTitle =
+ filterFieldTitle ||
+ _(
+ 'To change the filter, please filter your results on the report page. This filter will not be stored as default.',
+ );
+ return (
+ <>
+
+ {filterString}
+
+
-
-
-
-);
+
+ >
+ );
+};
ComposerContent.propTypes = {
filterFieldTitle: PropTypes.string,
diff --git a/src/web/components/dialog/confirmationdialog.jsx b/src/web/components/dialog/confirmationdialog.jsx
index 3b5ec6f128..47f6f44694 100644
--- a/src/web/components/dialog/confirmationdialog.jsx
+++ b/src/web/components/dialog/confirmationdialog.jsx
@@ -15,40 +15,36 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see .
*/
-import React from 'react';
-
-import _ from 'gmp/locale';
+import React, {useCallback} from 'react';
import PropTypes from 'web/utils/proptypes';
import Dialog from 'web/components/dialog/dialog';
import DialogContent from 'web/components/dialog/content';
-import ScrollableContent from 'web/components/dialog/scrollablecontent';
-import DialogTitle from 'web/components/dialog/title';
import DialogTwoButtonFooter from 'web/components/dialog/twobuttonfooter';
-const DEFAULT_DIALOG_WIDTH = '400px';
+import useTranslation from 'web/hooks/useTranslation';
-const ConfirmationDialogContent = props => {
- const handleResume = () => {
- const {onResumeClick} = props;
+const DEFAULT_DIALOG_WIDTH = '400px';
+const ConfirmationDialogContent = ({
+ content,
+ close,
+ rightButtonTitle,
+ onResumeClick,
+}) => {
+ const handleResume = useCallback(() => {
if (onResumeClick) {
onResumeClick();
}
- };
-
- const {content, moveprops, title, rightButtonTitle} = props;
+ }, [onResumeClick]);
return (
-
-
- {content}
-
+ {content}
@@ -58,7 +54,6 @@ const ConfirmationDialogContent = props => {
ConfirmationDialogContent.propTypes = {
close: PropTypes.func.isRequired,
content: PropTypes.elementOrString,
- moveprops: PropTypes.object,
rightButtonTitle: PropTypes.string,
title: PropTypes.string.isRequired,
onResumeClick: PropTypes.func.isRequired,
@@ -68,18 +63,19 @@ const ConfirmationDialog = ({
width = DEFAULT_DIALOG_WIDTH,
content,
title,
- rightButtonTitle = _('OK'),
+ rightButtonTitle,
onClose,
onResumeClick,
}) => {
+ const [_] = useTranslation();
+
+ rightButtonTitle = rightButtonTitle || _('OK');
return (
-