diff --git a/apps/web/lib/components/modal.tsx b/apps/web/lib/components/modal.tsx
index 33ea9eed9..84985fc01 100644
--- a/apps/web/lib/components/modal.tsx
+++ b/apps/web/lib/components/modal.tsx
@@ -11,6 +11,7 @@ type Props = {
description?: string;
isOpen: boolean;
closeModal: () => void;
+ customCloseModal?: () => void;
className?: string;
alignCloseIcon?: boolean;
showCloseIcon?: boolean;
@@ -19,6 +20,7 @@ type Props = {
export function Modal({
isOpen,
closeModal,
+ customCloseModal,
children,
title,
titleClass,
@@ -54,7 +56,10 @@ export function Modal({
{description && {description}}
{showCloseIcon && (
{
+ closeModal();
+ customCloseModal?.();
+ }}
className={`absolute ${
alignCloseIcon ? 'right-2 top-3' : 'right-3 top-3'
} md:right-2 md:top-3 cursor-pointer z-50`}
diff --git a/apps/web/lib/features/daily-plan/add-task-estimation-hours-modal.tsx b/apps/web/lib/features/daily-plan/add-task-estimation-hours-modal.tsx
index 8914ae272..69a8b0184 100644
--- a/apps/web/lib/features/daily-plan/add-task-estimation-hours-modal.tsx
+++ b/apps/web/lib/features/daily-plan/add-task-estimation-hours-modal.tsx
@@ -89,13 +89,6 @@ export function AddTasksEstimationHoursModal(props: IAddTasksEstimationHoursModa
draft: false,
saved: false
});
- const isTomorrowPlan = useMemo(
- () =>
- plan &&
- new Date(moment().add(1, 'days').toDate()).toLocaleDateString('en') ==
- new Date(plan.date).toLocaleDateString('en'),
- [plan]
- );
const canStartWorking = useMemo(() => {
const isTodayPlan =
@@ -260,8 +253,8 @@ export function AddTasksEstimationHoursModal(props: IAddTasksEstimationHoursModa
const StartWorkingButton = (