Files
ragflow/web/src/wrappers/auth.tsx
balibabu 05da2a5872 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)
2026-01-19 19:09:41 +08:00

15 lines
350 B
TypeScript

import { useAuth } from '@/hooks/auth-hooks';
import { redirectToLogin } from '@/utils/authorization-util';
import { Outlet } from 'react-router';
export default function AuthWrapper() {
const { isLogin } = useAuth();
if (isLogin === true) {
return <Outlet />;
} else if (isLogin === false) {
redirectToLogin();
}
return <></>;
}