mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-02-02 00:25:06 +08:00
Fix: When large models output data rapidly, the scrollbar cannot remain at the bottom. #12701 (#12702)
### What problem does this PR solve? ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -409,7 +409,7 @@ export const useScrollToBottom = (
|
|||||||
const container = containerRef.current;
|
const container = containerRef.current;
|
||||||
container.scrollTo({
|
container.scrollTo({
|
||||||
top: container.scrollHeight - container.clientHeight,
|
top: container.scrollHeight - container.clientHeight,
|
||||||
behavior: 'smooth',
|
behavior: 'auto',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, [containerRef]);
|
}, [containerRef]);
|
||||||
|
|||||||
@ -22,7 +22,7 @@ const storage = {
|
|||||||
localStorage.setItem(Token, value);
|
localStorage.setItem(Token, value);
|
||||||
},
|
},
|
||||||
setUserInfo: (value: string | Record<string, unknown>) => {
|
setUserInfo: (value: string | Record<string, unknown>) => {
|
||||||
let valueStr = typeof value !== 'string' ? JSON.stringify(value) : value;
|
const valueStr = typeof value !== 'string' ? JSON.stringify(value) : value;
|
||||||
localStorage.setItem(UserInfo, valueStr);
|
localStorage.setItem(UserInfo, valueStr);
|
||||||
},
|
},
|
||||||
setItems: (pairs: Record<string, string>) => {
|
setItems: (pairs: Record<string, string>) => {
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import { useAuth } from '@/hooks/auth-hooks';
|
|||||||
import { redirectToLogin } from '@/utils/authorization-util';
|
import { redirectToLogin } from '@/utils/authorization-util';
|
||||||
import { Outlet } from 'react-router';
|
import { Outlet } from 'react-router';
|
||||||
|
|
||||||
export default () => {
|
export default function AuthWrapper() {
|
||||||
const { isLogin } = useAuth();
|
const { isLogin } = useAuth();
|
||||||
if (isLogin === true) {
|
if (isLogin === true) {
|
||||||
return <Outlet />;
|
return <Outlet />;
|
||||||
@ -11,4 +11,4 @@ export default () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return <></>;
|
return <></>;
|
||||||
};
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user