-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading '')
export const zoomConfig = {
level: 3,
levels: [
{
minCellWidth: 100,
scales: [
{ unit: 'month', step: 1, format: 'MMMM yyy' },
{ unit: 'week', step: 1, format: "'week' w" },
],
maxCellWidth: 0,
},
{
maxCellWidth: 200,
scales: [
{ unit: 'month', step: 1, format: 'MMMM yyy' },
{ unit: 'day', step: 1, format: 'd', css: dayStyle },
],
minCellWidth: 0,
},
{
minCellWidth: 25,
maxCellWidth: 100,
scales: [
{ unit: 'day', step: 1, format: 'MMM d', css: dayStyle },
{ unit: 'hour', step: 6, format: hoursTemplate },
],
},
{
maxCellWidth: 120,
scales: [
{ unit: 'day', step: 1, format: 'MMM d', css: dayStyle },
{ unit: 'hour', step: 1, format: 'HH:mm' },
],
minCellWidth: 0,
},
{
maxCellWidth: 250,
scales: [
{ unit: 'hour', step: 1, format: 'HH:mm', css: dayStyle },
{ unit: 'minute', step: 1, format: (d) => format(new Date(d), 'HH:mm') }, // Error
],
minCellWidth: 0,
},
],
};
registerScaleUnit('minute', {
start: (date) => startOfMinute(new Date(date)),
end: (date) => endOfMinute(new Date(date)),
isSame: (a, b) => isSameMinute(new Date(a), new Date(b)),
add: (date, amount) => addMinutes(new Date(date), amount),
});
const Timeline: React.FC = () => {
const data = useMemo(() => getData(), []);
return (
<Stack spacing={3}>
<MainInfo />
<WillowDark>
<Gantt tasks={data.tasks} links={data.links} zoom={zoomConfig} />
</WillowDark>
</Stack>
);
};
export default Timeline;
Metadata
Metadata
Assignees
Labels
No labels