import React from "react"; import { useTranslation } from "react-i18next"; import { CalendarDaysIcon } from "@heroicons/react/24/outline"; import TaskList from "./TaskList"; import { Task } from "../../entities/Task"; import { Project } from "../../entities/Project"; interface TodayPlanProps { todayPlanTasks: Task[] | undefined; projects: Project[]; onTaskUpdate: (task: Task) => Promise; onTaskDelete: (taskId: number) => Promise; onToggleToday?: (taskId: number) => Promise; } const TodayPlan: React.FC = ({ todayPlanTasks, projects, onTaskUpdate, onTaskDelete, onToggleToday, }) => { const { t } = useTranslation(); // Handle undefined or null todayPlanTasks const safeTodayPlanTasks = todayPlanTasks || []; if (safeTodayPlanTasks.length === 0) { return ( <>

{t('tasks.noPlanToday', 'No tasks planned for today yet')}

{t('tasks.addToPlanHint', 'Use the calendar icons next to suggested tasks to add them to your today plan')}

); } return ( <> ); }; export default TodayPlan;