fix: profile issues layout switch (#2228)

This commit is contained in:
Aaryan Khandelwal 2023-09-21 16:04:57 +05:30 committed by GitHub
parent de9f34cac3
commit 978909c021
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 7 deletions

View File

@ -76,7 +76,7 @@ export const AllBoards: React.FC<Props> = ({
readOnly={disableUserActions} readOnly={disableUserActions}
/> />
{groupedIssues ? ( {groupedIssues ? (
<div className="horizontal-scroll-enable flex h-full gap-x-4 p-8"> <div className="horizontal-scroll-enable flex h-full gap-x-4 p-8 bg-custom-background-90">
{Object.keys(groupedIssues).map((singleGroup, index) => { {Object.keys(groupedIssues).map((singleGroup, index) => {
const currentState = const currentState =
displayFilters?.group_by === "state" displayFilters?.group_by === "state"

View File

@ -51,7 +51,6 @@ export const ProfileIssuesView = () => {
groupedIssues, groupedIssues,
mutateProfileIssues, mutateProfileIssues,
displayFilters, displayFilters,
setDisplayFilters,
isEmpty, isEmpty,
filters, filters,
setFilters, setFilters,

View File

@ -71,9 +71,8 @@ export const reducer: ReducerFunctionType = (state, action) => {
...state, ...state,
display_filters: { display_filters: {
...state.display_filters, ...state.display_filters,
...payload, ...payload?.display_filters,
}, },
issueView: payload?.display_filters?.layout || "list",
}; };
return { return {
@ -100,7 +99,7 @@ export const reducer: ReducerFunctionType = (state, action) => {
case "SET_PROPERTIES": { case "SET_PROPERTIES": {
const newState = { const newState = {
...state, ...state,
properties: { display_properties: {
...state.display_properties, ...state.display_properties,
...payload?.display_properties, ...payload?.display_properties,
}, },
@ -129,7 +128,6 @@ export const ProfileIssuesContextProvider: React.FC<{ children: React.ReactNode
type: "SET_DISPLAY_FILTERS", type: "SET_DISPLAY_FILTERS",
payload: { payload: {
display_filters: { display_filters: {
...state.display_filters,
...displayFilter, ...displayFilter,
}, },
}, },
@ -179,7 +177,6 @@ export const ProfileIssuesContextProvider: React.FC<{ children: React.ReactNode
type: "SET_PROPERTIES", type: "SET_PROPERTIES",
payload: { payload: {
display_properties: { display_properties: {
...state.display_properties,
[key]: !state.display_properties[key], [key]: !state.display_properties[key],
}, },
}, },