diff --git a/apps/app/pages/projects/[projectId]/cycles/[cycleId].tsx b/apps/app/pages/projects/[projectId]/cycles/[cycleId].tsx index 666f92e6a..8fe449dbc 100644 --- a/apps/app/pages/projects/[projectId]/cycles/[cycleId].tsx +++ b/apps/app/pages/projects/[projectId]/cycles/[cycleId].tsx @@ -126,7 +126,6 @@ const SingleCycle: React.FC = () => { const { issueView, - setIssueView, groupByProperty, setGroupByProperty, groupedByIssues, @@ -134,6 +133,8 @@ const SingleCycle: React.FC = () => { setFilterIssue, orderBy, filterIssue, + setIssueViewToKanban, + setIssueViewToList, } = useIssuesFilter(cycleIssuesArray ?? []); const openCreateIssueModal = ( @@ -269,10 +270,7 @@ const SingleCycle: React.FC = () => { className={`h-7 w-7 p-1 grid place-items-center rounded hover:bg-gray-200 duration-300 outline-none ${ issueView === "list" ? "bg-gray-200" : "" }`} - onClick={() => { - setIssueView("list"); - setGroupByProperty(null); - }} + onClick={() => setIssueViewToList()} > @@ -281,10 +279,7 @@ const SingleCycle: React.FC = () => { className={`h-7 w-7 p-1 grid place-items-center rounded hover:bg-gray-200 duration-300 outline-none ${ issueView === "kanban" ? "bg-gray-200" : "" }`} - onClick={() => { - setIssueView("kanban"); - setGroupByProperty("state_detail.name"); - }} + onClick={() => setIssueViewToKanban()} >