mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 21:13:50 +00:00
perf: ai param config (#3451)
* perf: ai param config * pacakge import * perf: ai config doc
This commit is contained in:
@@ -25,18 +25,20 @@ const SystemStoreContextProvider = ({
|
||||
children: ReactNode;
|
||||
device?: 'pc' | 'mobile' | null;
|
||||
}) => {
|
||||
const [isPc] = useMediaQuery('(min-width: 900px)');
|
||||
|
||||
const [isPc] = useMediaQuery('(min-width: 900px)', {
|
||||
fallback: device === 'pc'
|
||||
});
|
||||
useEffect(() => {
|
||||
setSize(isPc ? 'pc' : 'mobile');
|
||||
}, [isPc]);
|
||||
|
||||
const contextValue = useMemo(
|
||||
() => ({
|
||||
isPc: device ? device === 'pc' : isPc
|
||||
isPc
|
||||
}),
|
||||
[device, isPc]
|
||||
[isPc]
|
||||
);
|
||||
|
||||
return (
|
||||
<useSystemStoreContext.Provider value={contextValue}>{children}</useSystemStoreContext.Provider>
|
||||
);
|
||||
|
Reference in New Issue
Block a user