@@ -32,7 +32,7 @@ const CalendarDayCell = ({
3232 day,
3333 items, // Now receives a mix of tasks and events
3434 onSelectTask,
35- onDayClick ,
35+ onAddTaskForDay ,
3636 onShowMoreClick,
3737 isCurrentMonth,
3838 isSelected
@@ -45,7 +45,7 @@ const CalendarDayCell = ({
4545 < motion . div
4646 onMouseEnter = { ( ) => setIsHovered ( true ) }
4747 onMouseLeave = { ( ) => setIsHovered ( false ) }
48- onClick = { ( ) => onDayClick ( day ) }
48+ onClick = { ( ) => onShowMoreClick ( day ) }
4949 variants = { cellVariants }
5050 className = { cn (
5151 "border-r border-b border-neutral-800 p-2 flex flex-col gap-1 overflow-hidden relative min-h-[120px] rounded-lg" ,
@@ -77,7 +77,7 @@ const CalendarDayCell = ({
7777 exit = { { opacity : 0 , scale : 0.8 } }
7878 onClick = { ( e ) => {
7979 e . stopPropagation ( )
80- onDayClick ( day )
80+ onAddTaskForDay ( day )
8181 } }
8282 className = "p-1 rounded-full hover:bg-brand-gray hover:text-brand-white"
8383 >
@@ -112,7 +112,7 @@ const CalendarDayCell = ({
112112const CalendarView = ( {
113113 tasks,
114114 onSelectTask,
115- onDayClick ,
115+ onAddTaskForDay ,
116116 onShowMoreClick,
117117 onMonthChange
118118} ) => {
@@ -137,11 +137,6 @@ const CalendarView = ({
137137 onMonthChange ( newMonth )
138138 }
139139
140- const handleDayClickInternal = ( day ) => {
141- setSelectedDate ( day )
142- onDayClick ( day )
143- }
144-
145140 const containerVariants = {
146141 hidden : { opacity : 1 } ,
147142 visible : {
@@ -196,7 +191,7 @@ const CalendarView = ({
196191 items = { tasksForDay }
197192 isCurrentMonth = { isSameMonth ( day , currentMonth ) }
198193 onSelectTask = { onSelectTask }
199- onDayClick = { handleDayClickInternal }
194+ onAddTaskForDay = { onAddTaskForDay }
200195 onShowMoreClick = { onShowMoreClick }
201196 isSelected = { isSameDay ( day , selectedDate ) }
202197 />
0 commit comments