mirror of
https://github.com/arc53/DocsGPT.git
synced 2025-11-29 16:43:16 +00:00
chore: on deleting an uploaded doc, default doc gets set as selected source doc
This commit is contained in:
@@ -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