From 9bd9b31f1e0646359938da363b76e9ab4c27833a Mon Sep 17 00:00:00 2001 From: usserwoutV2 Date: Thu, 23 May 2024 11:06:36 +0200 Subject: [PATCH] Fixed typescript err --- frontend/src/pages/editProject/EditProject.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/src/pages/editProject/EditProject.tsx b/frontend/src/pages/editProject/EditProject.tsx index c75149fe..cfc75422 100644 --- a/frontend/src/pages/editProject/EditProject.tsx +++ b/frontend/src/pages/editProject/EditProject.tsx @@ -14,6 +14,8 @@ import { ProjectContext } from "../../router/ProjectRoutes" import useApi from "../../hooks/useApi" import saveDockerForm, { DockerFormData } from "../../components/common/saveDockerForm" +type DockerStuff = POST_Requests[ApiRoutes.PROJECT_TESTS] & {dockerMode: boolean} + const EditProject: React.FC = () => { const [form] = Form.useForm() const { t } = useTranslation() @@ -24,7 +26,7 @@ const EditProject: React.FC = () => { const navigate = useNavigate() const project = useProject() const { updateProject } = useContext(ProjectContext) - const [initialDockerValues, setInitialDockerValues] = useState(null) + const [initialDockerValues, setInitialDockerValues] = useState(null) const [disabled, setDisabled] = useState(true) @@ -34,7 +36,7 @@ const EditProject: React.FC = () => { setDisabled(false) if (!response.success) return setInitialDockerValues(null) - let formVals: POST_Requests[ApiRoutes.PROJECT_TESTS] & {dockerMode: boolean} = { + let formVals: DockerStuff= { structureTest: null, dockerTemplate: null, dockerScript: null,