mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-22 03:10:15 +01:00
fix: fix conversations in nav (put refreshConvoHint back)
This commit is contained in:
parent
dd0a91a9f6
commit
573112de7b
5 changed files with 8 additions and 16 deletions
|
|
@ -4,7 +4,6 @@ import { useUpdateConversationMutation } from '~/data-provider';
|
|||
import RenameButton from './RenameButton';
|
||||
import DeleteButton from './DeleteButton';
|
||||
import ConvoIcon from '../svg/ConvoIcon';
|
||||
import manualSWR from '~/utils/fetchers';
|
||||
|
||||
import store from '~/store';
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ export default function Nav({ navVisible, setNavVisible }) {
|
|||
const conversation = useRecoilValue(store.conversation);
|
||||
const { conversationId } = conversation || {};
|
||||
const setSearchResultMessages = useSetRecoilState(store.searchResultMessages);
|
||||
|
||||
const refreshConversationsHint = useRecoilValue(store.refreshConversationsHint);
|
||||
const { refreshConversations } = store.useConversations();
|
||||
|
||||
const [isFetching, setIsFetching] = useState(false);
|
||||
|
|
@ -112,6 +112,12 @@ export default function Nav({ navVisible, setNavVisible }) {
|
|||
}
|
||||
}, [getConversationsQuery.isSuccess, getConversationsQuery.data, isSearching, pageNumber]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!isSearching) {
|
||||
getConversationsQuery.refetch();
|
||||
}
|
||||
}, [pageNumber, conversationId, refreshConversationsHint]);
|
||||
|
||||
const moveToTop = () => {
|
||||
const container = containerRef.current;
|
||||
if (container) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue