From 978909c021b830410768eb3023fa9733f5c5fde0 Mon Sep 17 00:00:00 2001 From: Aaryan Khandelwal <65252264+aaryan610@users.noreply.github.com> Date: Thu, 21 Sep 2023 16:04:57 +0530 Subject: [PATCH] fix: profile issues layout switch (#2228) --- web/components/core/views/board-view/all-boards.tsx | 2 +- web/components/profile/profile-issues-view.tsx | 1 - web/contexts/profile-issues-context.tsx | 7 ++----- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/web/components/core/views/board-view/all-boards.tsx b/web/components/core/views/board-view/all-boards.tsx index ea5ebb2b1..37503043a 100644 --- a/web/components/core/views/board-view/all-boards.tsx +++ b/web/components/core/views/board-view/all-boards.tsx @@ -76,7 +76,7 @@ export const AllBoards: React.FC = ({ readOnly={disableUserActions} /> {groupedIssues ? ( -
+
{Object.keys(groupedIssues).map((singleGroup, index) => { const currentState = displayFilters?.group_by === "state" diff --git a/web/components/profile/profile-issues-view.tsx b/web/components/profile/profile-issues-view.tsx index b0337ecd4..035e8b990 100644 --- a/web/components/profile/profile-issues-view.tsx +++ b/web/components/profile/profile-issues-view.tsx @@ -51,7 +51,6 @@ export const ProfileIssuesView = () => { groupedIssues, mutateProfileIssues, displayFilters, - setDisplayFilters, isEmpty, filters, setFilters, diff --git a/web/contexts/profile-issues-context.tsx b/web/contexts/profile-issues-context.tsx index 39b8020d7..44c17b50a 100644 --- a/web/contexts/profile-issues-context.tsx +++ b/web/contexts/profile-issues-context.tsx @@ -71,9 +71,8 @@ export const reducer: ReducerFunctionType = (state, action) => { ...state, display_filters: { ...state.display_filters, - ...payload, + ...payload?.display_filters, }, - issueView: payload?.display_filters?.layout || "list", }; return { @@ -100,7 +99,7 @@ export const reducer: ReducerFunctionType = (state, action) => { case "SET_PROPERTIES": { const newState = { ...state, - properties: { + display_properties: { ...state.display_properties, ...payload?.display_properties, }, @@ -129,7 +128,6 @@ export const ProfileIssuesContextProvider: React.FC<{ children: React.ReactNode type: "SET_DISPLAY_FILTERS", payload: { display_filters: { - ...state.display_filters, ...displayFilter, }, }, @@ -179,7 +177,6 @@ export const ProfileIssuesContextProvider: React.FC<{ children: React.ReactNode type: "SET_PROPERTIES", payload: { display_properties: { - ...state.display_properties, [key]: !state.display_properties[key], }, },