Skip to content

Commit deb7686

Browse files
committed
chore validate
1 parent 5adb602 commit deb7686

File tree

9 files changed

+15
-40
lines changed

9 files changed

+15
-40
lines changed

src/pages/Plan/modals/DateInThePastAlertModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ const DateInThePastAlertModal = ({ onQuit }: { onQuit: () => void }) => {
6666
.then(() => {
6767
navigate(window.location.pathname, { replace: true });
6868
})
69-
.catch((err) => {
69+
.catch(() => {
7070
addToast(
7171
({ close }) => (
7272
<Notification

src/pages/Plan/modules/Factory/modules/Literacy/Component.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import {
22
AccordionNew,
3-
Button,
43
Checkbox,
54
FormField,
65
Hint,

src/pages/Plan/modules/Factory/modules/OutOfScope/Component.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import {
66
Label,
77
SM,
88
Span,
9-
Textarea,
109
Tooltip,
1110
} from '@appquality/unguess-design-system';
1211
import { useState } from 'react';

src/pages/Plan/modules/Factory/modules/TargetSize/Component.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import {
22
AccordionNew,
33
Alert,
4-
Button,
54
FormField,
65
IconButton,
76
Input,

src/pages/Video/components/EditTagModal.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import {
1010
TooltipModal,
1111
useToast,
1212
} from '@appquality/unguess-design-system';
13-
import { current } from '@reduxjs/toolkit';
1413
import { useEffect, useRef, useState } from 'react';
1514
import { Trans, useTranslation } from 'react-i18next';
1615
import { useParams } from 'react-router-dom';
@@ -73,10 +72,10 @@ export const EditTagModal = ({ closeModal, tag }: EditModalProps) => {
7372
),
7473
{ placement: 'top' }
7574
);
76-
} catch (error: any) {
75+
} catch (err: any) {
7776
// Handle error (e.g., show error toast)
7877
// if status code is 409, conflict with another already saved name, show specific error
79-
if (error.status === 409) {
78+
if (err.status === 409) {
8079
setError(
8180
t('__VIDEO_PAGE_ACTIONS_OBSERVATION_FORM_FIELD_TITLE_DUPLICATE_ERROR')
8281
);

src/pages/Video/components/TitleDropdownNew.tsx

Lines changed: 11 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,13 @@
11
import {
22
Autocomplete,
3-
Button,
43
DropdownFieldNew as Field,
5-
Input,
6-
Label,
7-
MD,
8-
Message,
9-
Notification,
10-
Paragraph,
11-
SM,
12-
TooltipModal,
13-
useToast,
144
} from '@appquality/unguess-design-system';
155
import { FormikProps } from 'formik';
16-
import { useEffect, useRef, useState } from 'react';
17-
import { Trans, useTranslation } from 'react-i18next';
6+
import { useTranslation } from 'react-i18next';
187
import { useParams } from 'react-router-dom';
19-
import { appTheme } from 'src/app/theme';
208
import { ReactComponent as CopyIcon } from 'src/assets/icons/copy-icon.svg';
21-
import { ReactComponent as SaveIcon } from 'src/assets/icons/save.svg';
229
import {
2310
GetCampaignsByCidVideoTagsApiResponse,
24-
usePatchCampaignsByCidVideoTagsAndTagIdMutation,
2511
usePostCampaignsByCidVideoTagsMutation,
2612
} from 'src/features/api';
2713
import { EditTagModal } from './EditTagModal';
@@ -99,18 +85,16 @@ export const TitleDropdown = ({
9985
{
10086
id: 'titles-group',
10187
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+
})),
11498
},
11599
]}
116100
startIcon={<CopyIcon />}

src/pages/Video/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import { useFeatureFlag } from 'src/hooks/useFeatureFlag';
1616
import { useLocalizeRoute } from 'src/hooks/useLocalizedRoute';
1717
import VideoPageHeader from './components/PageHeader';
1818
import VideoPageContent from './Content';
19-
import { Helmet } from 'react-helmet';
2019

2120
const VideoPage = () => {
2221
const { t } = useTranslation();

tests/e2e/plan/modules/tasks.spec.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@ test.describe('The tasks module defines a list of activities.', () => {
2323
await moduleBuilderPage.elements().tabInstructions().click();
2424
});
2525

26-
test('Tasks can be deleted, but it is required to have at least 1 item to Request a Quote', async ({
27-
i18n,
28-
}) => {
26+
test('Tasks can be deleted, but it is required to have at least 1 item to Request a Quote', async () => {
2927
await expect(tasksModule.elements().module()).toBeVisible();
3028
const tasks = TasksModule.getTasksFromPlan(apiGetDraftMandatoryPlan);
3129
await expect(tasksModule.elements().taskListItem()).toHaveCount(

tests/e2e/video/observation.spec.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ test.describe('Video page', () => {
124124

125125
test('in the theme edit modal should show an error if trying to save with empty name or an existing theme name', async ({
126126
i18n,
127-
page,
128127
}) => {
129128
await videopage.mockPatchVideoTag('20767', 409);
130129
await videopage.openObservationAccordion(1);
@@ -211,7 +210,6 @@ test.describe('Video page', () => {
211210

212211
test('in the tag edit modal should show an error if trying to save with empty name or an existing tag name', async ({
213212
i18n,
214-
page,
215213
}) => {
216214
await videopage.mockPatchVideoTag('1103', 409);
217215
await videopage.openObservationAccordion(1);

0 commit comments

Comments
 (0)