diff --git a/src/components/view/board/BoardView.tsx b/src/components/view/board/BoardView.tsx index 26a7caa..5a6cdeb 100644 --- a/src/components/view/board/BoardView.tsx +++ b/src/components/view/board/BoardView.tsx @@ -1,6 +1,6 @@ "use client"; -import { useState } from "react"; +import { useEffect, useState } from "react"; import { Card, CardHeader, @@ -31,27 +31,35 @@ const id = (prefix = "t") => export default function BoardView() { const [columns, setColumns] = useState>({ - todo: [ - { id: id(), title: "Buy groceries" }, - { id: id(), title: "Plan sprint" }, - ], - inprogress: [ - { - id: id(), - title: "Build header", - description: "A simple description", - tags: [ - { name: "Website", color: "pink" }, - { name: "Development", color: "blue" }, - { name: "API", color: "green" }, - { name: "App", color: "purple" }, - { name: "Rust", color: "orange" }, - ], - }, - ], + todo: [], + inprogress: [], done: [], }); + useEffect(() => { + setColumns({ + todo: [ + { id: id(), title: "Buy groceries" }, + { id: id(), title: "Plan sprint" }, + ], + inprogress: [ + { + id: id(), + title: "Build header", + description: "A simple description", + tags: [ + { name: "Website", color: "pink" }, + { name: "Development", color: "blue" }, + { name: "API", color: "green" }, + { name: "App", color: "purple" }, + { name: "Rust", color: "orange" }, + ], + }, + ], + done: [], + }); + }, []); + function onDragEnd(result: any) { const { source, destination } = result; if (!destination) return; @@ -87,7 +95,7 @@ export default function BoardView() {