diff --git a/app/src/components/logbookEntryForm/LogbookEntryForm.tsx b/app/src/components/logbookEntryForm/LogbookEntryForm.tsx index 029e979..0342dcb 100644 --- a/app/src/components/logbookEntryForm/LogbookEntryForm.tsx +++ b/app/src/components/logbookEntryForm/LogbookEntryForm.tsx @@ -15,7 +15,12 @@ import { Typography, XmarkIcon } from '@noahspan/noahspan-components'; -import { useForm, Controller, FormProvider } from 'react-hook-form'; +import { + useForm, + Controller, + SubmitHandler, + FormProvider +} from 'react-hook-form'; import { ILogbookEntryFormProps } from './ILogbookEntryFormProps'; import { initialState, reducer } from './reducer'; import axios, { AxiosInstance, AxiosResponse } from 'axios'; @@ -78,7 +83,7 @@ const LogbookEntryForm: React.FC = ({ const accessToken: string = await getAccessToken(); - if (!entryId) { + if (entryId) { await httpClient.post(`api/logbook`, data, { headers: { Authorization: accessToken