Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

1.adjust code style.

mitsuhaec99dca594cf
diff --git a/libs/components/layout/src/header/FileSystem.tsx b/libs/components/layout/src/header/FileSystem.tsx
index 016b26d1c4..30c2b68816 100644
--- a/libs/components/layout/src/header/FileSystem.tsx
+++ b/libs/components/layout/src/header/FileSystem.tsx
@@ -4,7 +4,7 @@ import { CloseIcon } from '@toeverything/components/common';
import { IconButton, MuiSnackbar, styled } from '@toeverything/components/ui';
import { services } from '@toeverything/datasource/db-service';
import { useLocalTrigger } from '@toeverything/datasource/state';
-
+import { useTranslation } from 'react-i18next';
const cleanupWorkspace = (workspace: string) =>
new Promise((resolve, reject) => {
const req = indexedDB.deleteDatabase(workspace);
@@ -75,7 +75,7 @@ export const FileSystem = () => {
setError(true);
setTimeout(() => setError(false), 3000);
}, []);
-
+ const { t } = useTranslation();
const apiSupported = useMemo(() => fsApiSupported(), []);
if (apiSupported && !selected) {
@@ -105,7 +105,7 @@ export const FileSystem = () => {
}
}}
>
- Sync to Disk
+ {t('Sync to Disk')}
</StyledFileSystem>
</>
);
diff --git a/libs/components/layout/src/settings-sidebar/Settings/util/inspector-workspace.ts b/libs/components/layout/src/settings-sidebar/Settings/util/inspector-workspace.ts
index 6cbd275a01..c1edd95c65 100644
--- a/libs/components/layout/src/settings-sidebar/Settings/util/inspector-workspace.ts
+++ b/libs/components/layout/src/settings-sidebar/Settings/util/inspector-workspace.ts
@@ -6,8 +6,6 @@ export const importWorkspace = async () => {
//@ts-ignore
const status = await window.client.inspector().load();
- console.log(status);
-
if (status) {
window.location.reload();
}
diff --git a/libs/datasource/state/src/user.ts b/libs/datasource/state/src/user.ts
index 953603ef2b..063f9f7f04 100644
--- a/libs/datasource/state/src/user.ts
+++ b/libs/datasource/state/src/user.ts
@@ -71,11 +71,7 @@ const _useUserAndSpacesForFreeLogin = () => {
useEffect(() => {
if (loading) {
- if (location.pathname.startsWith('/local')) {
- navigate('/local');
- } else {
- navigate(`/${BRAND_ID}`);
- }
+ navigate(`/${BRAND_ID}`);
setLoading(false);
}
}, []);