Skip to content

Commit bb2a498

Browse files
Merge pull request #714 from contentstack/bugfix/cmg-616
refactor:resolved copilot comments
2 parents cff90bb + a0bbe3e commit bb2a498

File tree

9 files changed

+21
-23
lines changed

9 files changed

+21
-23
lines changed

.talismanrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,7 @@ fileignoreconfig:
5656
- filename: ui/src/components/AuditLogs/index.tsx
5757
checksum: 51ce05f66ac49023452f200e587389e55c88357102a61e77eb468d0e02b52846
5858

59+
- filename: ui/src/components/ContentMapper/index.tsx
60+
checksum: b5f66e808ecf4461ccb5c4fde937da1e6d9e640a2521d6d85858a22261df6571
61+
62+

ui/src/components/AuditFilterModal/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ const AuditFilterModal = ({
9797
})
9898
) : (
9999
<div className="tableFilterModalStories__no-data">
100-
{auditLogsConstants?.filterModal?.noFilterAvailabe}
100+
{auditLogsConstants?.filterModal?.noFilterAvailable}
101101
</div>
102102
)}
103103
</div>

ui/src/components/AuditLogs/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ const AuditLogs: React.FC = () => {
6666
const predefinedOptions: FileOption[] = [
6767
{ label: 'Content Types', value: 'content-types' },
6868
{ label: 'Global Fields', value: 'global-fields' },
69-
{ label: 'Entries', value: 'Entries_Select_feild' }
69+
{ label: 'Entries', value: 'Entries_Select_field' }
7070
];
7171
setFileOptions(predefinedOptions);
7272
}

ui/src/components/FilterModal/FilterModal.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Button, ButtonGroup, Checkbox, Icon } from '@contentstack/venus-components';
22
import './FilterModal.scss';
3-
import { FilterModaleProps } from './filterModal.interface';
3+
import { FilterModalProps } from './filterModal.interface';
44

55
const FilterModal = ({
66
isOpen,
@@ -10,7 +10,7 @@ const FilterModal = ({
1010
selectedLevels,
1111
setSelectedFilterOption,
1212
filterOptions
13-
}: FilterModaleProps) => {
13+
}: FilterModalProps) => {
1414
const clearAll = () => {
1515
setSelectedFilterOption([]);
1616
};

ui/src/components/FilterModal/filterModal.interface.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { FilterOption } from "../ExecutionLogs/executionlog.interface";
22

3-
export type FilterModaleProps = {
3+
export type FilterModalProps = {
44
isOpen: boolean;
55
closeModal: () => void;
66
updateValue: (params: { value: FilterOption; isChecked: boolean }) => void;

ui/src/components/LogScreen/MigrationLogViewer.tsx

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Libraries
22
import React, { useEffect, useState, useRef } from 'react';
3-
import { Icon, cbModal, Link } from '@contentstack/venus-components';
3+
import { Icon, Link, Notification } from '@contentstack/venus-components';
44
import io from 'socket.io-client';
55
import { useSelector, useDispatch } from 'react-redux';
66
import { useNavigate, useParams } from 'react-router';
@@ -204,19 +204,13 @@ const MigrationLogViewer = ({ serverPath }: LogsType) => {
204204
*/
205205
//await updateCurrentStepData(selectedOrganisation.value, projectId);
206206

207-
return cbModal({
208-
component: (props: ModalObj) => (
209-
<MigrationCompletionModal
210-
{...props}
211-
isopen={setIsModalOpen}
212-
data={newMigrationData?.stackDetails}
213-
stackLink={stackLink}
214-
/>
215-
),
216-
modalProps: {
217-
size: 'xsmall',
218-
shouldCloseOnOverlayClick: false
219-
}
207+
Notification({
208+
notificationContent: { text: message },
209+
notificationProps: {
210+
position: 'bottom-center',
211+
hideProgressBar: false
212+
},
213+
type: 'success'
220214
});
221215
}
222216
} catch (error) {

ui/src/components/Modal/modal.interface.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export interface Project {
3434
}
3535

3636
export interface CreateProjectResponse {
37-
status: "success";
37+
status: number;
3838
message: string;
3939
project: Project;
4040
}

ui/src/services/api/project.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@ export const getAuditData = async (orgId: string, projectId: string, stackId: st
8888
return await getCall(`${API_VERSION}/migration/get_audit_data/${orgId}/${projectId}/${stackId}/${moduleName}/${skip}/${limit}/${startIndex}/${stopIndex}/${searchText}/${filter}`, options());
8989
} catch (error) {
9090
if (error instanceof Error) {
91-
throw new Error(`Error in userSession: ${error?.message}`);
91+
throw new Error(`Error in fetching audit data: ${error?.message}`);
9292
} else {
93-
throw new Error('Unknown error in userSession');
93+
throw new Error('Unknown error in fetching audit data');
9494
}
9595
}
9696
};

ui/src/utilities/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ export const auditLogsConstants = {
142142
noMatch: 'NoSearchResult'
143143
},
144144
filterModal: {
145-
noFilterAvailabe: 'No Filters Available',
145+
noFilterAvailable: 'No Filters Available',
146146
clearAll: 'Clear All',
147147
apply: 'Apply'
148148
}

0 commit comments

Comments
 (0)