diff --git a/taskncoffee-app/src/App.jsx b/taskncoffee-app/src/App.jsx
index 2ed40e6..4735723 100644
--- a/taskncoffee-app/src/App.jsx
+++ b/taskncoffee-app/src/App.jsx
@@ -5,7 +5,7 @@ import { AuthLayout } from './layouts/AuthLayout'
import { Routes, Route, Navigate } from 'react-router'
import Dashboard from './pages/Dashboard'
import RootRedirect from './pages/RootRedirect'
-import CardComponent from './components/Card'
+import { TaskButton } from './components/Card'
function App() {
@@ -24,7 +24,7 @@ function App() {
Card description
- + )} + > + ) +} + +export function CardComponent({ + status = "todo", + time_spent = 0, + description = "No description", + title = "Task", + priority = "medium", + due_date = null +}) { + const formatTimeSpent = (minutes) => { + if (!minutes || minutes === 0) return "0 min"; + const hours = Math.floor(minutes / 60); + const mins = minutes % 60; + if (hours > 0) { + return `${hours}h ${mins > 0 ? `${mins}m` : ''}`; + } + return `${mins}m`; + }; + + const formatDate = (dateString) => { + if (!dateString) return "No due date"; + const date = new Date(dateString); + return date.toLocaleDateString('en-US', { + month: 'short', + day: 'numeric', + year: 'numeric' + }); + }; + + const priorityBadgeStyle = { + low: styles.badge.low, + medium: styles.badge.medium, + high: styles.badge.high, + critical: styles.badge.critical, + }; + + const statusLabels = { + open: "Open", + closed: "Closed", + in_progress: "In Progress", + todo: "To Do" + }; + + return ( ++ {description} +
+ +