mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
chore(core): temporarily remove set-syncing-mode (#4489)
This commit is contained in:
@@ -269,7 +269,8 @@ export const CreateWorkspaceModal = ({
|
||||
const result: LoadDBFileResult = await window.apis.dialog.loadDBFile();
|
||||
if (result.workspaceId && !canceled) {
|
||||
setAddedId(result.workspaceId);
|
||||
setStep('set-syncing-mode');
|
||||
const newWorkspaceId = await addLocalWorkspace(result.workspaceId);
|
||||
onCreate(newWorkspaceId);
|
||||
} else if (result.error || result.canceled) {
|
||||
if (result.error) {
|
||||
toast(t[result.error]());
|
||||
@@ -287,7 +288,7 @@ export const CreateWorkspaceModal = ({
|
||||
return () => {
|
||||
canceled = true;
|
||||
};
|
||||
}, [mode, onClose, t]);
|
||||
}, [addLocalWorkspace, mode, onClose, onCreate, t]);
|
||||
|
||||
const onConfirmEnableCloudSyncing = useCallback(
|
||||
(enableCloudSyncing: boolean) => {
|
||||
@@ -332,19 +333,11 @@ export const CreateWorkspaceModal = ({
|
||||
const onConfirmName = useCallback(
|
||||
(name: string) => {
|
||||
setWorkspaceName(name);
|
||||
if (environment.isDesktop && runtimeConfig.enableSQLiteProvider) {
|
||||
setStep('set-syncing-mode');
|
||||
} else {
|
||||
// this will be the last step for web for now
|
||||
// fix me later
|
||||
createLocalWorkspace(name)
|
||||
.then(id => {
|
||||
onCreate(id);
|
||||
})
|
||||
.catch(err => {
|
||||
logger.error(err);
|
||||
});
|
||||
}
|
||||
// this will be the last step for web for now
|
||||
// fix me later
|
||||
createLocalWorkspace(name).then(id => {
|
||||
onCreate(id);
|
||||
});
|
||||
},
|
||||
[createLocalWorkspace, onCreate]
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user