Skip to content

Commit

Permalink
feat: Some minors fixes after review
Browse files Browse the repository at this point in the history
  • Loading branch information
JF-Cozy committed Mar 21, 2023
1 parent 7243629 commit 31f4e55
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions react/MuiCozyTheme/ListItem/ListItemByDoc/index.jsx
Expand Up @@ -14,8 +14,8 @@ const ListItemByDoc = ({
expandedAttributesProps,
onClick
}) => {
switch (true) {
case doc._type === 'io.cozy.contacts':
switch (doc._type) {
case 'io.cozy.contacts':
return (
<ListItemContact
contact={doc}
Expand All @@ -29,7 +29,7 @@ const ListItemByDoc = ({
/>
)

case doc._type === 'io.cozy.files':
case 'io.cozy.files':
return (
<ListItemFile
file={doc}
Expand Down
2 changes: 1 addition & 1 deletion react/MuiCozyTheme/ListItem/ListItemContact/index.jsx
Expand Up @@ -18,7 +18,7 @@ const ListItemContact = ({
onClick
}) => {
const primaryText = primary || contact.displayName
const secondaryText = secondary || contact.email[0].address
const secondaryText = secondary || contact.email?.[0]?.address
const itemIcon = icon || <Icon icon={ContactsIcon} width="32" height="32" />

const itemExpandedAttributes = makeDefaultExpandedAttributes(
Expand Down

0 comments on commit 31f4e55

Please sign in to comment.