diff --git a/packages/app/src/components/workspace-modal/index.tsx b/packages/app/src/components/workspace-modal/index.tsx index ab0df439c0..46cd1a9182 100644 --- a/packages/app/src/components/workspace-modal/index.tsx +++ b/packages/app/src/components/workspace-modal/index.tsx @@ -6,6 +6,10 @@ import { getWorkspaces, Workspace, setActiveWorkspace, + Login, + User, + getUserInfo, + SignOut, } from '@/hooks/mock-data/mock'; import { CreateWorkspaceModal } from '../create-workspace'; import { @@ -13,6 +17,8 @@ import { CloudInsyncIcon, UsersIcon, } from '@blocksuite/icons'; +import { useConfirm } from '@/providers/confirm-provider'; +import { toast } from '@/ui/toast'; interface LoginModalProps { open: boolean; @@ -21,20 +27,29 @@ interface LoginModalProps { export const WorkspaceModal = ({ open, onClose }: LoginModalProps) => { const [workspaceList, setWorkspaceList] = useState([]); + const [user, setUser] = useState(); const [createWorkspaceOpen, setCreateWorkspaceOpen] = useState(false); - + const { confirm } = useConfirm(); useEffect(() => { - getList(); + setList(); + setUserInfo(); }, []); - const getList = () => { + const setList = () => { const data = getWorkspaces(); setWorkspaceList(data); }; + const setUserInfo = () => { + const data = getUserInfo(); + setUser(data); + }; return (
- +
My Workspaces { - -