mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-22 03:10:15 +01:00
rearrange convo fetching for performance in progress
This commit is contained in:
parent
c00a2c902b
commit
e4d1ff2523
5 changed files with 21 additions and 8 deletions
|
|
@ -1,16 +1,13 @@
|
|||
import React, { useState } from 'react';
|
||||
import { useSelector } from 'react-redux';
|
||||
import Conversation from './Conversation';
|
||||
import { swr } from '~/utils/fetchers';
|
||||
// import { swr } from '~/utils/fetchers';
|
||||
import useDidMountEffect from '~/hooks/useDidMountEffect';
|
||||
|
||||
export default function Conversations() {
|
||||
const { data, error, isLoading, mutate } = swr('http://localhost:3050/convos');
|
||||
const conversations = data;
|
||||
const [isHovering, setIsHovering] = useState(false);
|
||||
const { conversationId } = useSelector((state) => state.convo);
|
||||
|
||||
useDidMountEffect(() => mutate(), [conversationId]);
|
||||
// useDidMountEffect(() => mutate(), [conversationId]);
|
||||
// const currentRef = useRef(null);
|
||||
|
||||
// const scrollToTop = () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue