mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-29 08:09:52 +08:00
feat: add new rule for floating promise (#2726)
Co-authored-by: Himself65 <himself65@outlook.com>
This commit is contained in:
@@ -204,7 +204,9 @@ export const WorkspaceLayout: FC<PropsWithChildren> =
|
||||
useEffect(() => {
|
||||
document.documentElement.lang = i18n.language;
|
||||
// todo(himself65): this is a hack, we should use a better way to set the language
|
||||
setUpLanguage(i18n);
|
||||
setUpLanguage(i18n)?.catch(error => {
|
||||
console.error(error);
|
||||
});
|
||||
}, [i18n]);
|
||||
useTrackRouterHistoryEffect();
|
||||
const currentWorkspaceId = useAtomValue(rootCurrentWorkspaceIdAtom);
|
||||
@@ -247,7 +249,9 @@ export const WorkspaceLayout: FC<PropsWithChildren> =
|
||||
logger.info('mount first data:', items);
|
||||
}
|
||||
|
||||
fetch();
|
||||
fetch().catch(e => {
|
||||
logger.error('fetch error:', e);
|
||||
});
|
||||
return () => {
|
||||
controller.abort();
|
||||
logger.info('unmount');
|
||||
|
||||
Reference in New Issue
Block a user