mirror of
https://github.com/linsa-io/linsa.git
synced 2026-03-18 15:23:59 +01:00
* tasks * task input * fixed jazz things * create new task ui * feat: simple feature flag --------- Co-authored-by: marshennikovaolga <marshennikova@gmail.com> Co-authored-by: Aslam H <iupin5212@gmail.com>
24 lines
535 B
TypeScript
24 lines
535 B
TypeScript
import React from "react"
|
|
import { ListOfTasks, Task } from "@/lib/schema/tasks"
|
|
import { TaskItem } from "./TaskItem"
|
|
|
|
interface TaskListProps {
|
|
tasks?: ListOfTasks
|
|
onUpdateTask: (taskId: string, updates: Partial<Task>) => void
|
|
}
|
|
|
|
export const TaskList: React.FC<TaskListProps> = ({ tasks, onUpdateTask }) => {
|
|
return (
|
|
<ul className="flex flex-col gap-y-2">
|
|
{tasks?.map(
|
|
task =>
|
|
task?.id && (
|
|
<li key={task.id}>
|
|
<TaskItem task={task} onUpdateTask={onUpdateTask} />
|
|
</li>
|
|
)
|
|
)}
|
|
</ul>
|
|
)
|
|
}
|