Skip to content

Commit 12e5e15

Browse files
github-actions[bot]chasprowebdevMarfuen
authored
fix(app): task dates should be creation date instead of defaults (#1620)
Co-authored-by: chasprowebdev <chasgarciaprowebdev@gmail.com> Co-authored-by: Mariano Fuentes <marfuen98@gmail.com>
1 parent 1f4639f commit 12e5e15

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎apps/app/src/app/(app)/[orgId]/tasks/components/TaskCard.tsx‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { usePathname, useRouter } from 'next/navigation';
66
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
77
import { useDrag, useDrop } from 'react-dnd';
88
import { TaskStatusSelector } from './TaskStatusSelector';
9+
import { format } from 'date-fns';
910

1011
// DnD Item Type identifier for tasks.
1112
export const ItemTypes = {
@@ -196,7 +197,11 @@ export function TaskCard({
196197
>
197198
<span className="min-w-0 flex-grow truncate py-2 text-sm">{task.title}</span>
198199
<div className="ml-auto flex shrink-0 items-center space-x-3 pl-2">
199-
<span className="text-muted-foreground text-xs whitespace-nowrap">Apr 15</span>
200+
<span className="text-muted-foreground text-xs whitespace-nowrap">
201+
{task.createdAt
202+
? format(new Date(task.createdAt), 'MMM d, yyyy')
203+
: ''}
204+
</span>
200205
<div className="bg-muted flex h-5 w-5 items-center justify-center overflow-hidden rounded-full border">
201206
{assignedMember?.user?.image ? (
202207
<Image

0 commit comments

Comments
 (0)