{dataObj[key].body}
+{body}
{type}
; + const typeMappings: any = { + LOCATION_REQUEST_MESSAGE: 'Location request', + QUICK_REPLY: 'Quick Reply', + LIST: 'List', + }; + + return{typeMappings[text]}
; }; const getBody = (text: string) => { diff --git a/src/containers/InteractiveMessage/InteractiveOptions/InteractiveOptions.test.tsx b/src/containers/InteractiveMessage/InteractiveOptions/InteractiveOptions.test.tsx index 7af577f6a..9377bcb2f 100644 --- a/src/containers/InteractiveMessage/InteractiveOptions/InteractiveOptions.test.tsx +++ b/src/containers/InteractiveMessage/InteractiveOptions/InteractiveOptions.test.tsx @@ -81,13 +81,6 @@ test('it render interactive options for list reply template', async () => { fireEvent.click(listItem1); await waitFor(() => {}); - - const [quickReplyRadio] = screen.getAllByRole('radio'); - - expect(quickReplyRadio).toBeInTheDocument(); - fireEvent.click(quickReplyRadio); - - await waitFor(() => {}); }); const quickReplyInputFields = [{ value: 'yes' }, { value: 'no' }]; diff --git a/src/containers/InteractiveMessage/InteractiveOptions/InteractiveOptions.tsx b/src/containers/InteractiveMessage/InteractiveOptions/InteractiveOptions.tsx index 419386540..e9a710bb4 100644 --- a/src/containers/InteractiveMessage/InteractiveOptions/InteractiveOptions.tsx +++ b/src/containers/InteractiveMessage/InteractiveOptions/InteractiveOptions.tsx @@ -1,15 +1,7 @@ -import { - RadioGroup, - FormControlLabel, - Radio, - FormControl, - TextField, - FormHelperText, -} from '@mui/material'; +import { FormControl, TextField, FormHelperText } from '@mui/material'; import { FieldArray } from 'formik'; -import ApprovedIcon from 'assets/images/icons/Template/Approved.svg?react'; -import { QUICK_REPLY, LIST } from 'common/constants'; +import { QUICK_REPLY, LIST, LOCATION_REQUEST } from 'common/constants'; import { QuickReplyTemplate } from './QuickReplyTemplate'; import { ListReplyTemplate } from './ListReplyTemplate'; import styles from './InteractiveOptions.module.css'; @@ -37,14 +29,12 @@ export const InteractiveOptions = ({ form, onAddClick, onRemoveClick, - onTemplateTypeChange, onInputChange, onGlobalButtonInputChange, onListItemAddClick, onListItemRemoveClick, disabled = false, translation, - disabledType, }: InteractiveOptionsProps) => { const { values, errors, touched, setFieldValue } = form; @@ -101,47 +91,6 @@ export const InteractiveOptions = ({ const radioTemplateType = (