diff --git a/web/components/issues/issue-layouts/calendar/quick-add-issue-form.tsx b/web/components/issues/issue-layouts/calendar/quick-add-issue-form.tsx index 7e17496d4..7f992d8c9 100644 --- a/web/components/issues/issue-layouts/calendar/quick-add-issue-form.tsx +++ b/web/components/issues/issue-layouts/calendar/quick-add-issue-form.tsx @@ -82,9 +82,11 @@ export const CalendarQuickAddIssueForm: React.FC = observer((props) => { const [isExistingIssueModalOpen, setIsExistingIssueModalOpen] = useState(false); // derived values const projectDetail = projectId ? getProjectById(projectId.toString()) : null; - const ExistingIssuesListModalPayload = moduleId - ? { module: moduleId.toString(), target_date: "none" } - : { cycle: true, target_date: "none" }; + const ExistingIssuesListModalPayload = addIssuesToView + ? moduleId + ? { module: moduleId.toString(), target_date: "none" } + : { cycle: true, target_date: "none" } + : { target_date: "none" }; const { reset, @@ -234,33 +236,22 @@ export const CalendarQuickAddIssueForm: React.FC = observer((props) => { block: isMenuOpen, })} > - {addIssuesToView ? ( - setIsMenuOpen(true)} - onMenuClose={() => setIsMenuOpen(false)} - className="w-full" - customButtonClassName="w-full" - customButton={ -
- - New Issue -
- } - > - New Issue - Add existing issue -
- ) : ( - - )} + setIsMenuOpen(true)} + onMenuClose={() => setIsMenuOpen(false)} + className="w-full" + customButtonClassName="w-full" + customButton={ +
+ + New Issue +
+ } + > + New Issue + Add existing issue +
)}