fixes, update Nav images on theme toggle

This commit is contained in:
ManishMadan2882
2024-02-01 03:43:05 +05:30
parent 7a1c9101b2
commit dea385384a
6 changed files with 39 additions and 45 deletions

View File

@@ -1,5 +1,6 @@
import { Fragment, useEffect, useRef, useState } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import { useDarkTheme } from '../hooks';
import Hero from '../Hero';
import { AppDispatch } from '../store';
import ConversationBubble from './ConversationBubble';
@@ -23,7 +24,7 @@ export default function Conversation() {
const dispatch = useDispatch<AppDispatch>();
const endMessageRef = useRef<HTMLDivElement>(null);
const inputRef = useRef<HTMLDivElement>(null);
const isDarkTheme = document.documentElement.classList.contains('dark');
const [isDarkTheme]= useDarkTheme();
const [hasScrolledToLast, setHasScrolledToLast] = useState(true);
useEffect(() => {