Skip to content

Commit 5617a4a

Browse files
committed
refactor:resolved copilots error
1 parent 8f2ae08 commit 5617a4a

File tree

7 files changed

+32
-16
lines changed

7 files changed

+32
-16
lines changed

.talismanrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,7 @@ ignoreconfig:
1010
ignore_detectors:
1111
- Base64Detector
1212

13+
- filename: ui/src/components/ContentMapper/index.tsx
14+
checksum: 938aaf193e830bade84f9d8d385e55942269c3f2e7be82939994d64d76df3fa6
15+
1316
version: "1.0"

ui/src/components/ContentMapper/index.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ div .table-row {
311311
font-size: $size-font-large;
312312
font-weight: $font-weight-semi-bold;
313313
}
314-
.filtetButton-color{
314+
.filterButton-color{
315315
color: $color-brand-primary-base;
316316
font-weight: $font-weight-bold;
317317
}

ui/src/components/ContentMapper/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2255,7 +2255,7 @@ const ContentMapper = forwardRef(({handleStepChange}: contentMapperProps, ref: R
22552255
}
22562256
}}
22572257
>
2258-
{CONTENT_MAPPING_STATUS[key] && <span className={`${activeFilter === CONTENT_MAPPING_STATUS[key] ? 'filter-status filtetButton-color' :'filter-status' }`}>{CONTENT_MAPPING_STATUS[key]}</span> }
2258+
{CONTENT_MAPPING_STATUS[key] && <span className={`${activeFilter === CONTENT_MAPPING_STATUS[key] ? 'filter-status filterButton-color' :'filter-status' }`}>{CONTENT_MAPPING_STATUS[key]}</span> }
22592259
{STATUS_ICON_Mapping[key] && <Icon size="small" icon={STATUS_ICON_Mapping[key]} className={STATUS_ICON_Mapping[key] === 'CheckedCircle' ? 'mapped-icon' : ''} />}
22602260
</button>
22612261
</li>

ui/src/components/DestinationStack/index.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,15 @@ const DestinationStackComponent = ({
100100
setisProjectMapped(newMigrationData?.isprojectMapped);
101101
},[newMigrationData?.isprojectMapped]);
102102

103-
useEffect(()=>{
104-
if(! isEmptyString(newMigrationData?.destination_stack?.selectedStack?.value )
105-
){
106-
handleAllStepsComplete(true);
107-
}
108-
else{
109-
handleAllStepsComplete(false);
110-
}
111-
},[newMigrationData])
103+
useEffect(()=>{
104+
if(! isEmptyString(newMigrationData?.destination_stack?.selectedStack?.value )
105+
){
106+
handleAllStepsComplete(true);
107+
}
108+
else{
109+
handleAllStepsComplete(false);
110+
}
111+
},[newMigrationData?.destination_stack?.selectedStack])
112112

113113
return (
114114
<>

ui/src/components/Modal/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import { ProjectModalProps, FormData } from './modal.interface';
1919

2020
// Services
2121
import { useState } from 'react';
22-
import { createProject } from '../../services/api/project.service';
2322

2423
const Modal = (props: ProjectModalProps) => {
2524
const {

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

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export interface ProjectModalProps {
99
selectedOrg: IDropDown;
1010
closeModal: () => void;
1111
isOpen: (flag: boolean) => void;
12-
createProject: (values : FormData)=> void
12+
createProject: (values : FormData)=> Promise<CreateProjectResponse>
1313
}
1414
export interface SettingsModalProps {
1515
selectedOrg: IDropDown;
@@ -23,3 +23,17 @@ export interface SettingsModalProps {
2323
export interface FormData {
2424
name?: string;
2525
}
26+
27+
export interface Project {
28+
name: string;
29+
id: string;
30+
status: string;
31+
created_at: string;
32+
modified_at: string;
33+
}
34+
35+
export interface CreateProjectResponse {
36+
status: "success";
37+
message: string;
38+
project: Project;
39+
}

ui/src/pages/Projects/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import { validateObject } from '../../utilities/functions';
2727

2828
// Interfaces
2929
import { ProjectsType, ProjectsObj } from './projects.interface';
30-
import { ModalObj } from '../../components/Modal/modal.interface';
30+
import { CreateProjectResponse, ModalObj, FormData } from '../../components/Modal/modal.interface';
3131
import { CTA } from '../Home/home.interface';
3232
import usePreventBackNavigation from '../../hooks/usePreventBackNavigation';
3333

@@ -137,8 +137,8 @@ const Projects = () => {
137137
};
138138
useBlockNavigation(isModalOpen || true);
139139

140-
const createProjectCall = async(values : any) => {
141-
const res:any = await createProject(selectedOrganisation?.uid || '', values);
140+
const createProjectCall = async(values : FormData): Promise<CreateProjectResponse> => {
141+
const res = await createProject(selectedOrganisation?.uid || '', values);
142142
if (res?.error) {
143143
return res?.error;
144144
}

0 commit comments

Comments
 (0)