Skip to content

Commit

Permalink
fix(ListItemContact): DisplayName wasn't compliant with old contact app
Browse files Browse the repository at this point in the history
  • Loading branch information
JF-Cozy committed Apr 3, 2023
1 parent 52fffe3 commit 1cd6ffb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion react/MuiCozyTheme/ListItem/ListItemContact/index.jsx
@@ -1,6 +1,8 @@
import React from 'react'
import PropTypes from 'prop-types'

import { getDisplayName } from 'cozy-client/dist/models/contact'

import Filename from '../../../Filename'
import Icon from '../../../Icon'
import ContactsIcon from '../../../Icons/Contacts'
Expand All @@ -19,7 +21,7 @@ const ListItemContact = ({
onClick
}) => {
const defaultActions = useActions(contact)
const primaryText = primary || contact.displayName
const primaryText = primary || getDisplayName(contact)
const secondaryText = secondary || contact.email?.[0]?.address
const itemIcon = icon || <Icon icon={ContactsIcon} width="32" height="32" />

Expand Down

0 comments on commit 1cd6ffb

Please sign in to comment.