mirror of
https://github.com/arc53/DocsGPT
synced 2024-11-19 21:25:39 +00:00
chore: on deleting an uploaded doc, default doc gets set as selected source doc
This commit is contained in:
parent
e6b3984f78
commit
8fc6284317
@ -137,6 +137,8 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) {
|
|||||||
) as HTMLElement;
|
) as HTMLElement;
|
||||||
const parentElement = imageElement.parentNode as HTMLElement;
|
const parentElement = imageElement.parentNode as HTMLElement;
|
||||||
parentElement.parentNode?.removeChild(parentElement);
|
parentElement.parentNode?.removeChild(parentElement);
|
||||||
|
|
||||||
|
dispatch(setSelectedDocs(docs?.find((doc) => doc.name == 'default')));
|
||||||
})
|
})
|
||||||
.catch((error) => console.error(error));
|
.catch((error) => console.error(error));
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user