mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-16 23:45:33 +01:00
🖱️ feat: Switch Scroll Button setting (#5332)
This commit is contained in:
parent
8a0c7d92bd
commit
1c459ed3af
6 changed files with 46 additions and 2 deletions
|
|
@ -17,6 +17,7 @@ export default function MessagesView({
|
|||
Header?: ReactNode;
|
||||
}) {
|
||||
const localize = useLocalize();
|
||||
const scrollButtonPreference = useRecoilValue(store.showScrollButton);
|
||||
const fontSize = useRecoilValue(store.fontSize);
|
||||
const { screenshotTargetRef } = useScreenshot();
|
||||
const [currentEditId, setCurrentEditId] = useState<number | string | null>(-1);
|
||||
|
|
@ -83,7 +84,10 @@ export default function MessagesView({
|
|||
unmountOnExit={false}
|
||||
// appear
|
||||
>
|
||||
{() => showScrollButton && <ScrollToBottom scrollHandler={handleSmoothToRef} />}
|
||||
{() =>
|
||||
showScrollButton &&
|
||||
scrollButtonPreference && <ScrollToBottom scrollHandler={handleSmoothToRef} />
|
||||
}
|
||||
</CSSTransition>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue