Skip to content

Commit

Permalink
Refactor types and remove console
Browse files Browse the repository at this point in the history
  • Loading branch information
vinit717 committed Jul 26, 2023
1 parent d9966a3 commit 76f149b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/components/taskDetails/Details.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import classNames from './task-details.module.scss';

type Props = {
detailType: string;
value: string;
value?: string;
};

const Details: FC<Props> = ({ detailType, value }) => {
Expand Down
5 changes: 2 additions & 3 deletions src/components/taskDetails/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ const TaskDetails: FC<Props> = ({ taskID }) => {
taskDetailsDataType['taskData'] | undefined
>(data?.taskData);

console.log('edittaskdetails', editedTaskDetails);
useEffect(() => {
if (data?.taskData) {
setEditedTaskDetails(data.taskData);
Expand Down Expand Up @@ -228,10 +227,10 @@ const TaskDetails: FC<Props> = ({ taskID }) => {
detailType={'Status'}
value={taskDetailsData?.status}
/>
{/* <Details
<Details
detailType={'Link'}
value={taskDetailsData?.featureUrl}
/> */}
/>
</div>
</TaskContainer>
{isDevModeEnabled && (
Expand Down
6 changes: 5 additions & 1 deletion src/interfaces/taskDetails.type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export type taskDetailsDataType = {
completionAward: { dinero: number; neelam: number };
createdBy: string;
endsOn: number;
purpose: string;
isNoteworthy: boolean;
dependsOn: string[];
lossRate: { dinero: number; neelam: number };
Expand All @@ -15,6 +16,8 @@ export type taskDetailsDataType = {
status: string;
title: string;
type: string;
participants: string[];
featureUrl: string;
};
};

Expand All @@ -25,7 +28,7 @@ export type ButtonProps = {
};
export type TextAreaProps = {
name: string;
value: string;
value: string | undefined;
onChange: ChangeEventHandler;
testId: string;
};
Expand All @@ -37,6 +40,7 @@ export type TaskDependencyProps = {
handleChange: (
event: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>
) => void;
setEditedTaskDetails: any;
};
export type DependencyListProps = {
taskDependencyIds: string[];
Expand Down

0 comments on commit 76f149b

Please sign in to comment.