fix: lint warning

This commit is contained in:
DiamondThree
2023-01-06 16:58:21 +08:00
parent 78facb2fe6
commit 3e76a94730
8 changed files with 23 additions and 25 deletions
@@ -11,7 +11,7 @@ export const WorkspaceSelector = () => {
if (workspaceMetaList.length === 0) {
setWorkspaceListShow(true);
}
});
}, [workspaceMetaList]);
return (
<>
@@ -24,14 +24,17 @@ export const WorkspaceSelector = () => {
<Avatar
alt="Affine"
data-testid="workspace-avatar"
src={currentWorkspace.avatar}
src={currentWorkspace?.avatar}
>
<div
style={{
float: 'left',
}}
>
<WorkspaceAvatar size={28} name={currentWorkspace.name} />
<WorkspaceAvatar
size={28}
name={currentWorkspace?.name ?? 'AFFiNE'}
/>
</div>
</Avatar>
<WorkspaceName data-testid="workspace-name">