diff --git a/web/src/hooks/logic-hooks.ts b/web/src/hooks/logic-hooks.ts index 25b2589ff..3c1baccbd 100644 --- a/web/src/hooks/logic-hooks.ts +++ b/web/src/hooks/logic-hooks.ts @@ -409,7 +409,7 @@ export const useScrollToBottom = ( const container = containerRef.current; container.scrollTo({ top: container.scrollHeight - container.clientHeight, - behavior: 'smooth', + behavior: 'auto', }); } }, [containerRef]); diff --git a/web/src/utils/authorization-util.ts b/web/src/utils/authorization-util.ts index 0c9118cd3..227f33b54 100644 --- a/web/src/utils/authorization-util.ts +++ b/web/src/utils/authorization-util.ts @@ -22,7 +22,7 @@ const storage = { localStorage.setItem(Token, value); }, setUserInfo: (value: string | Record) => { - let valueStr = typeof value !== 'string' ? JSON.stringify(value) : value; + const valueStr = typeof value !== 'string' ? JSON.stringify(value) : value; localStorage.setItem(UserInfo, valueStr); }, setItems: (pairs: Record) => { diff --git a/web/src/wrappers/auth.tsx b/web/src/wrappers/auth.tsx index 1d827cf70..052750332 100644 --- a/web/src/wrappers/auth.tsx +++ b/web/src/wrappers/auth.tsx @@ -2,7 +2,7 @@ import { useAuth } from '@/hooks/auth-hooks'; import { redirectToLogin } from '@/utils/authorization-util'; import { Outlet } from 'react-router'; -export default () => { +export default function AuthWrapper() { const { isLogin } = useAuth(); if (isLogin === true) { return ; @@ -11,4 +11,4 @@ export default () => { } return <>; -}; +}