1.adjust code style.
This commit is contained in:
@@ -4,7 +4,7 @@ import { CloseIcon } from '@toeverything/components/common';
|
|||||||
import { IconButton, MuiSnackbar, styled } from '@toeverything/components/ui';
|
import { IconButton, MuiSnackbar, styled } from '@toeverything/components/ui';
|
||||||
import { services } from '@toeverything/datasource/db-service';
|
import { services } from '@toeverything/datasource/db-service';
|
||||||
import { useLocalTrigger } from '@toeverything/datasource/state';
|
import { useLocalTrigger } from '@toeverything/datasource/state';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
const cleanupWorkspace = (workspace: string) =>
|
const cleanupWorkspace = (workspace: string) =>
|
||||||
new Promise((resolve, reject) => {
|
new Promise((resolve, reject) => {
|
||||||
const req = indexedDB.deleteDatabase(workspace);
|
const req = indexedDB.deleteDatabase(workspace);
|
||||||
@@ -75,7 +75,7 @@ export const FileSystem = () => {
|
|||||||
setError(true);
|
setError(true);
|
||||||
setTimeout(() => setError(false), 3000);
|
setTimeout(() => setError(false), 3000);
|
||||||
}, []);
|
}, []);
|
||||||
|
const { t } = useTranslation();
|
||||||
const apiSupported = useMemo(() => fsApiSupported(), []);
|
const apiSupported = useMemo(() => fsApiSupported(), []);
|
||||||
|
|
||||||
if (apiSupported && !selected) {
|
if (apiSupported && !selected) {
|
||||||
@@ -105,7 +105,7 @@ export const FileSystem = () => {
|
|||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Sync to Disk
|
{t('Sync to Disk')}
|
||||||
</StyledFileSystem>
|
</StyledFileSystem>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -6,8 +6,6 @@ export const importWorkspace = async () => {
|
|||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
const status = await window.client.inspector().load();
|
const status = await window.client.inspector().load();
|
||||||
|
|
||||||
console.log(status);
|
|
||||||
|
|
||||||
if (status) {
|
if (status) {
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,11 +71,7 @@ const _useUserAndSpacesForFreeLogin = () => {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (loading) {
|
if (loading) {
|
||||||
if (location.pathname.startsWith('/local')) {
|
|
||||||
navigate('/local');
|
|
||||||
} else {
|
|
||||||
navigate(`/${BRAND_ID}`);
|
navigate(`/${BRAND_ID}`);
|
||||||
}
|
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
}
|
}
|
||||||
}, []);
|
}, []);
|
||||||
|
|||||||
Reference in New Issue
Block a user