Fixed types
This commit is contained in:
@@ -2,17 +2,18 @@ import { FC, useState } from "react";
|
||||
import { OutlinedButton } from "@src/components/common/buttons/outlinedButton";
|
||||
import { PrimaryButton } from "@src/components/common/buttons/primaryButton";
|
||||
import { TodoShortForm } from "@src/components/todos/collapsed/todoShortForm";
|
||||
import { Priorities } from "@src/core/entities/todo";
|
||||
|
||||
export const AddTodoForm: FC<{
|
||||
onAdd: (
|
||||
todoName: string,
|
||||
project: string,
|
||||
description: string,
|
||||
priority: string
|
||||
priority?: Priorities
|
||||
) => void;
|
||||
onClose: () => void;
|
||||
project: string;
|
||||
priority: string;
|
||||
priority?: Priorities;
|
||||
}> = ({ onAdd, onClose, ...props }) => {
|
||||
const [todoName, setTodoName] = useState("");
|
||||
const [todoDescription, setTodoDescription] = useState("");
|
||||
|
@@ -22,7 +22,6 @@ export function AddTodo(props: { project: string }) {
|
||||
return (
|
||||
<AddTodoForm
|
||||
project={props.project}
|
||||
priority={""}
|
||||
onAdd={(todoName, project, description, priority) => {
|
||||
createTodo(todoName, description, project, priority);
|
||||
}}
|
||||
|
@@ -1,12 +1,13 @@
|
||||
import TextareaAutosize from "react-textarea-autosize";
|
||||
import { AddProjectButton } from "@src/components/todos/add/addProjectButton";
|
||||
import { AddPriorityButton } from "@src/components/todos/add/addPriorityButton";
|
||||
import { Priorities } from "@src/core/entities/todo";
|
||||
|
||||
export const TodoShortForm = (props: {
|
||||
project: string;
|
||||
onProjectChanged: (project: string) => void;
|
||||
priority: string;
|
||||
onPriorityChanged: (project: string) => void;
|
||||
priority: Priorities;
|
||||
onPriorityChanged: (project: Priorities) => void;
|
||||
name: string;
|
||||
onNameChange: (e) => void;
|
||||
description: string;
|
||||
|
Reference in New Issue
Block a user