mirror of
https://github.com/arc53/DocsGPT.git
synced 2025-11-30 00:53:14 +00:00
Fixed the redux state changes
This commit is contained in:
@@ -96,6 +96,9 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) {
|
||||
if (!conversations) {
|
||||
fetchConversations();
|
||||
}
|
||||
if (queries.length === 0) {
|
||||
resetConversation();
|
||||
}
|
||||
}, [conversations, dispatch]);
|
||||
|
||||
async function fetchConversations() {
|
||||
@@ -168,9 +171,8 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) {
|
||||
);
|
||||
};
|
||||
const newChat = () => {
|
||||
if (conversations && conversations?.length > 0) {
|
||||
if (queries && queries?.length > 0) {
|
||||
resetConversation();
|
||||
navigate('/');
|
||||
}
|
||||
};
|
||||
async function updateConversationName(updatedConversation: {
|
||||
|
||||
Reference in New Issue
Block a user