diff --git a/frontend/src/app/tasks/__tests__/components/CreateTask.test.tsx b/frontend/src/app/tasks/__tests__/components/CreateTask.test.tsx
index 1bbe2de8d..2b53f089d 100644
--- a/frontend/src/app/tasks/__tests__/components/CreateTask.test.tsx
+++ b/frontend/src/app/tasks/__tests__/components/CreateTask.test.tsx
@@ -279,7 +279,7 @@ describe('TaskForm', () => {
await user.click(screen.getByRole('button', { name: 'Save' }))
- expect(addTask).toHaveBeenCalledWith({
+ expect(addTask.mock.lastCall[0].task).toEqual({
date: '2023-01-01',
description: 'description!',
endTime: '13:00',
@@ -315,7 +315,7 @@ describe('TaskForm', () => {
await user.keyboard('{Control>}s')
- expect(addTask).toHaveBeenCalledWith({
+ expect(addTask.mock.lastCall[0].task).toEqual({
date: '2023-01-01',
description: 'description!',
endTime: '13:00',
@@ -351,7 +351,7 @@ describe('TaskForm', () => {
await user.keyboard('{Enter}')
- expect(addTask).toHaveBeenCalledWith({
+ expect(addTask.mock.lastCall[0].task).toEqual({
date: '2023-01-01',
description: 'description!',
endTime: '13:00',
diff --git a/frontend/src/app/tasks/components/CreateTask.tsx b/frontend/src/app/tasks/components/CreateTask.tsx
index 2399e8884..59f255e7d 100644
--- a/frontend/src/app/tasks/components/CreateTask.tsx
+++ b/frontend/src/app/tasks/components/CreateTask.tsx
@@ -21,8 +21,16 @@ type CreateTaskProps = {
}
export const CreateTask = ({ projects, taskTypes, templates }: CreateTaskProps) => {
- const { task, handleChange, resetForm, handleSubmit, formRef, selectTemplate, template } =
- useCreateTaskForm()
+ const {
+ task,
+ handleChange,
+ resetForm,
+ handleSubmit,
+ formRef,
+ selectTemplate,
+ template,
+ isLoading
+ } = useCreateTaskForm()
const { loggedTime, toggleTimer, isTimerRunning } = useTaskFormTimer({
handleChange,
startTime: task.startTime,
@@ -160,8 +168,8 @@ export const CreateTask = ({ projects, taskTypes, templates }: CreateTaskProps)
-