css progress 1
This commit is contained in:
parent
bd4e3af47f
commit
3e32ed6e0c
16 changed files with 61 additions and 86 deletions
25
app/page.tsx
25
app/page.tsx
|
@ -15,31 +15,6 @@ const LandingPage: React.FC = () => {
|
|||
const [view, setView] = useState<'AI' | 'FAQ' | 'Documentation' | 'Credits'>('AI'); // Added 'Credits' here
|
||||
const conversationRef = useRef<HTMLDivElement>(null);
|
||||
|
||||
useEffect(() => {
|
||||
const scrollToBottom = () => {
|
||||
const conversation = conversationRef.current;
|
||||
if (conversation) {
|
||||
conversation.scrollTop = conversation.scrollHeight;
|
||||
}
|
||||
};
|
||||
|
||||
scrollToBottom();
|
||||
|
||||
const observer = new MutationObserver(scrollToBottom);
|
||||
if (conversationRef.current) {
|
||||
observer.observe(conversationRef.current, {
|
||||
childList: true,
|
||||
subtree: true,
|
||||
});
|
||||
}
|
||||
|
||||
return () => {
|
||||
if (conversationRef.current) {
|
||||
observer.disconnect();
|
||||
}
|
||||
};
|
||||
}, []);
|
||||
|
||||
const toggleDivs = () => {
|
||||
setShowDivs(prevState => !prevState);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue