mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
refactor: ui adapter (#2577)
This commit is contained in:
@@ -96,7 +96,7 @@ function AuthContext({ children }: PropsWithChildren): ReactElement {
|
||||
return <>{children}</>;
|
||||
}
|
||||
|
||||
export const AffinePlugin: WorkspaceAdapter<WorkspaceFlavour.AFFINE> = {
|
||||
export const AffineAdapter: WorkspaceAdapter<WorkspaceFlavour.AFFINE> = {
|
||||
releaseType: ReleaseType.STABLE,
|
||||
flavour: WorkspaceFlavour.AFFINE,
|
||||
loadPriority: LoadPriority.HIGH,
|
||||
@@ -175,7 +175,7 @@ export const AffinePlugin: WorkspaceAdapter<WorkspaceFlavour.AFFINE> = {
|
||||
|
||||
await mutate(matcher => matcher === QueryKey.getWorkspaces);
|
||||
// refresh the local storage
|
||||
await AffinePlugin.CRUD.list();
|
||||
await AffineAdapter.CRUD.list();
|
||||
return id;
|
||||
},
|
||||
delete: async workspace => {
|
||||
@@ -208,7 +208,7 @@ export const AffinePlugin: WorkspaceAdapter<WorkspaceFlavour.AFFINE> = {
|
||||
return null;
|
||||
}
|
||||
const workspaces: AffineLegacyCloudWorkspace[] =
|
||||
await AffinePlugin.CRUD.list();
|
||||
await AffineAdapter.CRUD.list();
|
||||
return (
|
||||
workspaces.find(workspace => workspace.id === workspaceId) ?? null
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user