mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-21 19:00:13 +01:00
debugging convo state, useSWR now within convos component
This commit is contained in:
parent
0e5c7c7721
commit
dcf4f2a524
6 changed files with 213 additions and 15 deletions
|
|
@ -1,10 +1,16 @@
|
|||
import React, { useState } from 'react';
|
||||
import { useSelector } from 'react-redux';
|
||||
import Conversation from './Conversation';
|
||||
import { swr } from '~/utils/fetchers';
|
||||
import useDidMountEffect from '~/hooks/useDidMountEffect';
|
||||
|
||||
export default function Conversations({ conversations }) {
|
||||
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]);
|
||||
// const currentRef = useRef(null);
|
||||
|
||||
// const scrollToTop = () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue