fix: issue peek-overview delete functionality (#3134)
* fix: peek-overview delete issue * refactor: removed unused variables
This commit is contained in:
parent
969a51f425
commit
05e7afab8d
14 changed files with 172 additions and 35 deletions
|
|
@ -82,7 +82,7 @@ const PageDetailsPage: NextPageWithLayout = observer(() => {
|
|||
description_html: newDescription,
|
||||
})
|
||||
.then(() => {
|
||||
mutatePageDetails((prevData) => ({ ...prevData, description_html: newDescription }) as IPage, false);
|
||||
mutatePageDetails((prevData) => ({ ...prevData, description_html: newDescription } as IPage), false);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -162,15 +162,12 @@ const PageDetailsPage: NextPageWithLayout = observer(() => {
|
|||
}, [pageDetails?.description_html]); // TODO: Verify the exhaustive-deps warning
|
||||
|
||||
function createObjectFromArray(keys: string[], options: any): any {
|
||||
return keys.reduce(
|
||||
(obj, key) => {
|
||||
if (options[key] !== undefined) {
|
||||
obj[key] = options[key];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
{} as { [key: string]: any }
|
||||
);
|
||||
return keys.reduce((obj, key) => {
|
||||
if (options[key] !== undefined) {
|
||||
obj[key] = options[key];
|
||||
}
|
||||
return obj;
|
||||
}, {} as { [key: string]: any });
|
||||
}
|
||||
|
||||
const mutatePageDetailsHelper = (
|
||||
|
|
@ -499,7 +496,7 @@ const PageDetailsPage: NextPageWithLayout = observer(() => {
|
|||
projectId={projectId as string}
|
||||
issueId={peekIssueId ? (peekIssueId as string) : ""}
|
||||
isArchived={false}
|
||||
handleIssue={(issueToUpdate) => {
|
||||
handleIssue={async (issueToUpdate, action) => {
|
||||
if (peekIssueId && typeof peekIssueId === "string") {
|
||||
handleUpdateIssue(peekIssueId, issueToUpdate);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue