chore(data): add DEMO_TODAY anchor and use it for kanban day-counter
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user