feat: replease type Workspace with WorkspaceInfo

This commit is contained in:
DiamondThree
2023-01-10 12:06:17 +08:00
parent a80e15042a
commit 710d740f30
11 changed files with 28 additions and 193 deletions

View File

@@ -1,4 +1,5 @@
import { useAppState } from '@/providers/app-state-provider';
import { WorkspaceInfo } from '@affine/datacenter';
export const useWorkspaceHelper = () => {
const { dataCenter } = useAppState();
@@ -20,8 +21,12 @@ export const useWorkspaceHelper = () => {
dataCenter.setWorkspacePublish(workspaceId, publish);
};
const updateWorkspace = async (workspace: WorkspaceInfo) => {
console.log('workspace: ', workspace);
};
return {
createWorkspace,
publishWorkspace,
updateWorkspace,
};
};