diff --git a/ReactLearning/kanban-board/src/App.tsx b/ReactLearning/kanban-board/src/App.tsx index 93739ab..6a1d7b3 100644 --- a/ReactLearning/kanban-board/src/App.tsx +++ b/ReactLearning/kanban-board/src/App.tsx @@ -3,7 +3,6 @@ import KBColumn from "./components/KBColumn"; import "./App.css"; import Header from "./components/Header"; import Task from "./types/Task"; -import { isThisTypeNode } from "typescript"; type TaskPassback = { title: string; description: string; diff --git a/ReactLearning/kanban-board/src/components/Header.tsx b/ReactLearning/kanban-board/src/components/Header.tsx index 55be1b5..bf51281 100644 --- a/ReactLearning/kanban-board/src/components/Header.tsx +++ b/ReactLearning/kanban-board/src/components/Header.tsx @@ -1,20 +1,14 @@ import React from "react"; import Modal from "./Modal"; -import { Component } from "react"; import Task from "../types/Task"; - +import Column from "../types/Column" type TaskPassback = { title: string; description: string; priority: priority; column: number; }; -type Column = { - id: number; - name: string; - color: string; - tasks: Task[]; -}; + type priority = "normal" | "important" | "urgent"; type HeaderProps = { diff --git a/ReactLearning/kanban-board/src/components/KBColumn.tsx b/ReactLearning/kanban-board/src/components/KBColumn.tsx index e117e46..d7151ac 100644 --- a/ReactLearning/kanban-board/src/components/KBColumn.tsx +++ b/ReactLearning/kanban-board/src/components/KBColumn.tsx @@ -1,4 +1,3 @@ -import * as react from "react"; import Task from "../types/Task"; type KBColumnProps = { color?: string; diff --git a/ReactLearning/kanban-board/src/types/Column.ts b/ReactLearning/kanban-board/src/types/Column.ts new file mode 100644 index 0000000..969202b --- /dev/null +++ b/ReactLearning/kanban-board/src/types/Column.ts @@ -0,0 +1,8 @@ +import Task from "./Task" +type Column = { + id: number; + name: string; + color: string; + tasks: Task[]; + }; + export default Column \ No newline at end of file