mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-03-04 23:30:19 +01:00
🧩 fix: Redirect Stability and Build Chunking (#11965)
* 🔧 chore: Update Vite configuration to include additional package checks - Enhanced the Vite configuration to recognize 'dnd-core' and 'flip-toolkit' alongside existing checks for 'react-dnd' and 'react-flip-toolkit' for improved handling of React interactions. - Updated the markdown highlighting logic to also include 'lowlight' in addition to 'highlight.js' for better syntax highlighting support. * 🔧 fix: Update AuthContextProvider to prevent infinite re-fire of useEffect - Modified the dependency array of the useEffect hook in AuthContextProvider to an empty array, preventing unnecessary re-executions and potential infinite loops. Added an ESLint comment to clarify the decision regarding stable dependencies at mount. * chore: import order
This commit is contained in:
parent
09d5b1a739
commit
b01f3ccada
2 changed files with 20 additions and 8 deletions
|
|
@ -11,8 +11,8 @@ import { debounce } from 'lodash';
|
|||
import { useRecoilState } from 'recoil';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { setTokenHeader, SystemRoles } from 'librechat-data-provider';
|
||||
import type { ReactNode } from 'react';
|
||||
import type * as t from 'librechat-data-provider';
|
||||
import type { ReactNode } from 'react';
|
||||
import {
|
||||
useGetRole,
|
||||
useGetUserQuery,
|
||||
|
|
@ -167,7 +167,8 @@ const AuthContextProvider = ({
|
|||
navigate(buildLoginRedirectUrl());
|
||||
},
|
||||
});
|
||||
}, [authConfig?.test, refreshToken, setUserContext, navigate]);
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps -- deps are stable at mount; adding refreshToken causes infinite re-fire
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
if (userQuery.data) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue