fix: empty module mutation and issue view flicker fix (#1158)

This commit is contained in:
Anmol Singh Bhatia
2023-05-29 18:35:43 +05:30
committed by GitHub
parent c8caa925b1
commit c949c4d244
3 changed files with 23 additions and 42 deletions

View File

@@ -190,6 +190,19 @@ export const reducer: ReducerFunctionType = (state, action) => {
};
const saveDataToServer = async (workspaceSlug: string, projectID: string, state: any) => {
mutate<IProjectMember>(
workspaceSlug && projectID ? USER_PROJECT_VIEW(projectID as string) : null,
(prevData) => {
if (!prevData) return prevData;
return {
...prevData,
view_props: state,
};
},
false
);
await projectService.setProjectView(workspaceSlug, projectID, {
view_props: state,
});