Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
Fixed typescript err
Browse files Browse the repository at this point in the history
  • Loading branch information
usserwoutV2 committed May 23, 2024
1 parent 3470f1b commit 9bd9b31
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions frontend/src/pages/editProject/EditProject.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<ProjectFormData & DockerFormData>()
const { t } = useTranslation()
Expand All @@ -24,7 +26,7 @@ const EditProject: React.FC = () => {
const navigate = useNavigate()
const project = useProject()
const { updateProject } = useContext(ProjectContext)
const [initialDockerValues, setInitialDockerValues] = useState<POST_Requests[ApiRoutes.PROJECT_TESTS] | null>(null)
const [initialDockerValues, setInitialDockerValues] = useState<DockerStuff | null>(null)
const [disabled, setDisabled] = useState(true)


Expand All @@ -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,
Expand Down

0 comments on commit 9bd9b31

Please sign in to comment.