feat: enable workspace cloud

This commit is contained in:
DiamondThree
2023-01-10 20:08:31 +08:00
parent 8f18048254
commit 3be4e4015e
4 changed files with 5 additions and 1 deletions

View File

@@ -8,7 +8,6 @@ const defaultOutLineWorkspaceId = 'affine';
export const useEnsureWorkspace = () => {
const [workspaceLoaded, setWorkspaceLoaded] = useState(false);
const { workspaceList, loadWorkspace, user } = useAppState();
console.log('workspaceList: ', workspaceList);
const router = useRouter();
// const defaultOutLineWorkspaceId = '99ce7eb7';
@@ -41,6 +40,7 @@ export const useEnsureWorkspace = () => {
: (router.query.workspaceId as string) || defaultOutLineWorkspaceId;
loadWorkspace(workspaceId).finally(() => {
console.log('workspaceId: ', workspaceId);
setWorkspaceLoaded(true);
});
}, [loadWorkspace, router, user, workspaceList]);