diff --git a/frontend/src/components/Editor/index.tsx b/frontend/src/components/Editor/index.tsx index 9e7593e1ba..0ed486e248 100644 --- a/frontend/src/components/Editor/index.tsx +++ b/frontend/src/components/Editor/index.tsx @@ -5,13 +5,14 @@ function Editor({ value, language = 'yaml', onChange, + readOnly = false, }: EditorProps): JSX.Element { return ( { if (newValue) { @@ -26,10 +27,12 @@ interface EditorProps { value: string; language?: string; onChange: (value: string) => void; + readOnly?: boolean; } Editor.defaultProps = { language: undefined, + readOnly: false, }; export default Editor; diff --git a/frontend/src/container/ErrorDetails/index.tsx b/frontend/src/container/ErrorDetails/index.tsx index cdb9800620..702967fa08 100644 --- a/frontend/src/container/ErrorDetails/index.tsx +++ b/frontend/src/container/ErrorDetails/index.tsx @@ -2,7 +2,7 @@ import { Button, Divider, notification, Space, Table, Typography } from 'antd'; import Editor from 'components/Editor'; import dayjs from 'dayjs'; import history from 'lib/history'; -import React, { useMemo, useRef, useState } from 'react'; +import React, { useMemo, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { useLocation } from 'react-router-dom'; import { PayloadProps as GetByErrorTypeAndServicePayload } from 'types/api/errors/getByErrorTypeAndService'; @@ -21,7 +21,7 @@ function ErrorDetails(props: ErrorDetailsProps): JSX.Element { const errorDetail = idPayload; - const stackTraceValue = useRef(errorDetail.excepionStacktrace); + const [stackTraceValue] = useState(errorDetail.excepionStacktrace); const columns = useMemo( () => [ @@ -126,7 +126,6 @@ function ErrorDetails(props: ErrorDetailsProps): JSX.Element { > {t('newer')} - {/*