From da9dc1149abb6201f53e1a1667275b4be172954a Mon Sep 17 00:00:00 2001 From: David Leek Date: Tue, 19 Nov 2024 13:22:28 +0100 Subject: [PATCH] chore: fix some type names --- .../releases/ReleasePlanTemplate/MilestoneCard.tsx | 2 +- .../releases/ReleasePlanTemplate/MilestoneList.tsx | 6 +----- .../ReleasePlanTemplateAddStrategyForm.tsx | 6 +++++- .../component/releases/ReleasePlanTemplate/TemplateForm.tsx | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/frontend/src/component/releases/ReleasePlanTemplate/MilestoneCard.tsx b/frontend/src/component/releases/ReleasePlanTemplate/MilestoneCard.tsx index 8e91d059b6a3..e185de66da30 100644 --- a/frontend/src/component/releases/ReleasePlanTemplate/MilestoneCard.tsx +++ b/frontend/src/component/releases/ReleasePlanTemplate/MilestoneCard.tsx @@ -65,7 +65,7 @@ export const MilestoneCard = ({ showAddStrategyDialog, errors, clearErrors, -}: IMilestoneCard) => { +}: IMilestoneCardProps) => { const [editMode, setEditMode] = useState(false); return ( diff --git a/frontend/src/component/releases/ReleasePlanTemplate/MilestoneList.tsx b/frontend/src/component/releases/ReleasePlanTemplate/MilestoneList.tsx index 73c03d1a3f00..50d4cbe4f19c 100644 --- a/frontend/src/component/releases/ReleasePlanTemplate/MilestoneList.tsx +++ b/frontend/src/component/releases/ReleasePlanTemplate/MilestoneList.tsx @@ -1,5 +1,4 @@ import type { IReleasePlanMilestonePayload } from 'interfaces/releasePlans'; -import { useState } from 'react'; import { MilestoneCard } from './MilestoneCard'; import { styled } from '@mui/material'; import { Button } from '@mui/material'; @@ -26,11 +25,8 @@ export const MilestoneList = ({ setAddStrategyOpen, errors, clearErrors, -}: IMilestoneList) => { - const [currentMilestone, setCurrentMilestone] = useState(-1); - +}: IMilestoneListProps) => { const showAddStrategyDialog = (index: number) => { - setCurrentMilestone(index); setAddStrategyOpen(true); }; diff --git a/frontend/src/component/releases/ReleasePlanTemplate/ReleasePlanTemplateAddStrategyForm.tsx b/frontend/src/component/releases/ReleasePlanTemplate/ReleasePlanTemplateAddStrategyForm.tsx index 684a311272ff..7395c0dcbe7d 100644 --- a/frontend/src/component/releases/ReleasePlanTemplate/ReleasePlanTemplateAddStrategyForm.tsx +++ b/frontend/src/component/releases/ReleasePlanTemplate/ReleasePlanTemplateAddStrategyForm.tsx @@ -11,9 +11,13 @@ const StyledButtonContainer = styled('div')(() => ({ justifyContent: 'flex-end', })); +interface IReleasePlanTemplateAddStrategyFormProps { + onCancel: () => void; +} + export const ReleasePlanTemplateAddStrategyForm = ({ onCancel, -}: { onCancel: () => void }) => { +}: IReleasePlanTemplateAddStrategyFormProps) => { return ( = ({ +export const TemplateForm: React.FC = ({ name, setName, description,