Native data AI application framework based on AWEL+AGENT (#1152)

Co-authored-by: Fangyin Cheng <staneyffer@gmail.com>
Co-authored-by: lcx01800250 <lcx01800250@alibaba-inc.com>
Co-authored-by: licunxing <864255598@qq.com>
Co-authored-by: Aralhi <xiaoping0501@gmail.com>
Co-authored-by: xuyuan23 <643854343@qq.com>
Co-authored-by: aries_ckt <916701291@qq.com>
Co-authored-by: hzh97 <2976151305@qq.com>
This commit is contained in:
明天
2024-02-07 17:43:27 +08:00
committed by GitHub
parent dbb9ac83b1
commit d5afa6e206
328 changed files with 22606 additions and 3282 deletions

View File

@@ -33,25 +33,23 @@ function CssWrapper({ children }: { children: React.ReactElement }) {
setMuiMode(mode);
}, [mode]);
const ref = useRef<HTMLDivElement>(null);
useEffect(() => {
if (ref?.current && mode) {
ref?.current?.classList?.add(mode);
if (mode) {
document.body?.classList?.add(mode);
if (mode === 'light') {
ref?.current?.classList?.remove('dark');
document.body?.classList?.remove('dark');
} else {
ref?.current?.classList?.remove('light');
document.body?.classList?.remove('light');
}
}
}, [ref, mode]);
}, [mode]);
useEffect(() => {
i18n.changeLanguage && i18n.changeLanguage(window.localStorage.getItem(STORAGE_LANG_KEY) || 'en');
}, [i18n]);
return (
<div ref={ref}>
<div>
<TopProgressBar />
{children}
</div>