|
1 | 1 | import { |
2 | 2 | Autocomplete, |
3 | | - Button, |
4 | 3 | DropdownFieldNew as Field, |
5 | | - Input, |
6 | | - Label, |
7 | | - MD, |
8 | | - Message, |
9 | | - Notification, |
10 | | - Paragraph, |
11 | | - SM, |
12 | | - TooltipModal, |
13 | | - useToast, |
14 | 4 | } from '@appquality/unguess-design-system'; |
15 | 5 | import { FormikProps } from 'formik'; |
16 | | -import { useEffect, useRef, useState } from 'react'; |
17 | | -import { Trans, useTranslation } from 'react-i18next'; |
| 6 | +import { useTranslation } from 'react-i18next'; |
18 | 7 | import { useParams } from 'react-router-dom'; |
19 | | -import { appTheme } from 'src/app/theme'; |
20 | 8 | import { ReactComponent as CopyIcon } from 'src/assets/icons/copy-icon.svg'; |
21 | | -import { ReactComponent as SaveIcon } from 'src/assets/icons/save.svg'; |
22 | 9 | import { |
23 | 10 | GetCampaignsByCidVideoTagsApiResponse, |
24 | | - usePatchCampaignsByCidVideoTagsAndTagIdMutation, |
25 | 11 | usePostCampaignsByCidVideoTagsMutation, |
26 | 12 | } from 'src/features/api'; |
27 | 13 | import { EditTagModal } from './EditTagModal'; |
@@ -99,18 +85,16 @@ export const TitleDropdown = ({ |
99 | 85 | { |
100 | 86 | id: 'titles-group', |
101 | 87 | label: 'select or create', |
102 | | - options: (titles || []).map((i) => { |
103 | | - return { |
104 | | - id: i.id.toString(), |
105 | | - value: i.id.toString(), |
106 | | - label: `${i.name} (${i.usageNumber})`, |
107 | | - isSelected: formProps.values.title === i.id, |
108 | | - actions: ({ closeModal }) => ( |
109 | | - <EditTagModal tag={i} closeModal={closeModal} /> |
110 | | - ), |
111 | | - itemID: i.id.toString(), |
112 | | - }; |
113 | | - }), |
| 88 | + options: (titles || []).map((i) => ({ |
| 89 | + id: i.id.toString(), |
| 90 | + value: i.id.toString(), |
| 91 | + label: `${i.name} (${i.usageNumber})`, |
| 92 | + isSelected: formProps.values.title === i.id, |
| 93 | + actions: ({ closeModal }) => ( |
| 94 | + <EditTagModal tag={i} closeModal={closeModal} /> |
| 95 | + ), |
| 96 | + itemID: i.id.toString(), |
| 97 | + })), |
114 | 98 | }, |
115 | 99 | ]} |
116 | 100 | startIcon={<CopyIcon />} |
|
0 commit comments