"use client"; import { Todo } from "@/core/types"; import { MarkdownContent } from "./MarkdownContent"; interface TodoViewProps { todo: Todo; onDelete: () => void; } export function TodoView({ todo, onDelete }: TodoViewProps) { const priorityColors = { high: "bg-red-100 text-red-700 dark:bg-red-900/30 dark:text-red-300", medium: "bg-yellow-100 text-yellow-700 dark:bg-yellow-900/30 dark:text-yellow-300", low: "bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-300", }; return (
{/* Header */}
Todo {todo.frontmatter.priority && ( {todo.frontmatter.priority.charAt(0).toUpperCase() + todo.frontmatter.priority.slice(1)} Priority )} {todo.frontmatter.created}

{todo.frontmatter.title}

{todo.frontmatter.tags && todo.frontmatter.tags.length > 0 && (
{todo.frontmatter.tags.map((tag) => ( {tag} ))}
)}
{/* Actions */}
{/* Content */}
); }