mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-16 10:15:00 +00:00
chore: on deleting an uploaded doc, default doc gets set as selected source doc
This commit is contained in:
1 parent
e6b3984f78
commit
8fc6284317
1 file changed
+2
@@ -137,6 +137,8 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) {
|
||||
) as HTMLElement;
|
||||
const parentElement = imageElement.parentNode as HTMLElement;
|
||||
parentElement.parentNode?.removeChild(parentElement);
|
||||
|
||||
dispatch(setSelectedDocs(docs?.find((doc) => doc.name == 'default')));
|
||||
})
|
||||
.catch((error) => console.error(error));
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user