chore(data): add DEMO_TODAY anchor and use it for kanban day-counter

This commit is contained in:
Satyam Rastogi
2026-05-29 03:24:57 +05:30
parent 670b33c69b
commit a03fb0cf00
2 changed files with 5 additions and 1 deletions
+2 -1
View File
@@ -2,6 +2,7 @@ import React from 'react';
import { useDraggable } from '@dnd-kit/core';
import { CSS } from '@dnd-kit/utilities';
import { MapPin, User, Clock, CloudLightning } from 'lucide-react';
import { DEMO_TODAY } from '../../data/mockStore';
function getInitials(name) {
return (name || '').split(' ').map(w => w[0]).join('').slice(0, 2).toUpperCase();
@@ -11,7 +12,7 @@ function getDaysInStage(activity) {
if (!activity?.length) return 0;
const last = activity[0];
const lastDate = new Date(last.date);
const now = new Date('2026-04-07');
const now = DEMO_TODAY;
return Math.max(0, Math.floor((now - lastDate) / 86400000));
}