diff --git a/packages/app/src/components/workspace-avatar/index.tsx b/packages/app/src/components/workspace-avatar/index.tsx index ebce8a9f13..8300f1563c 100644 --- a/packages/app/src/components/workspace-avatar/index.tsx +++ b/packages/app/src/components/workspace-avatar/index.tsx @@ -11,21 +11,10 @@ interface IWorkspaceAvatar { export const WorkspaceAvatar = (props: IWorkspaceAvatar) => { const size = props.size || 20; const sizeStr = size + 'px'; - const { dataCenter, currentWorkspace } = useAppState(); - dataCenter.getBlob(currentWorkspace, props.avatar).then(res => { - setAvatar(res ?? ''); - }); - const [avatar, setAvatar] = useState(props.avatar); - - useEffect(() => { - dataCenter.getBlob(currentWorkspace, props.avatar).then(res => { - setAvatar(res ?? ''); - }); - }, [props.avatar]); return ( <> - {avatar ? ( + {props.avatar ? (
{ overflow: 'hidden', }} > - +
) : (
{ - console.log('workspace: ', workspace); - + // console.log('workspace: ', workspace); + const { enableWorkspace } = useWorkspaceHelper(); + const { currentWorkspace } = useAppState(); + const { confirm } = useConfirm(); + const { user, login } = useUserHelper(); return (
@@ -24,9 +32,20 @@ export const SyncPage = ({ workspace }: { workspace: WorkspaceInfo }) => {