mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-02-24 03:14:08 +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
|
|
@ -5,11 +5,14 @@ import TextChat from './components/main/TextChat';
|
|||
import Nav from './components/Nav';
|
||||
import MobileNav from './components/Nav/MobileNav';
|
||||
import useDocumentTitle from '~/hooks/useDocumentTitle';
|
||||
import { useSelector } from 'react-redux';
|
||||
import { useDispatch, useSelector } from 'react-redux';
|
||||
import { setConvos } from '~/store/convoSlice';
|
||||
|
||||
const App = () => {
|
||||
const { messages } = useSelector((state) => state.messages);
|
||||
const { title } = useSelector((state) => state.convo);
|
||||
const dispatch = useDispatch();
|
||||
const { data, error, isLoading, mutate } = swr('http://localhost:3050/convos', (res) => dispatch(setConvos(res)));
|
||||
|
||||
useDocumentTitle(title);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue