diff --git a/src/components/AuthorInfo/AuthorInfo.js b/src/components/AuthorInfo/AuthorInfo.js index b7441340..21ae8b66 100644 --- a/src/components/AuthorInfo/AuthorInfo.js +++ b/src/components/AuthorInfo/AuthorInfo.js @@ -1,6 +1,7 @@ import React, { PropTypes } from 'react'; import { FormattedMessage } from 'react-intl'; import classNames from 'classnames'; +import { Avatar } from '../../components'; import * as propTypes from '../../util/propTypes'; import css from './AuthorInfo.css'; @@ -12,12 +13,11 @@ const AuthorInfo = props => { const authorName = currentAuthor.attributes.profile ? `${currentAuthor.attributes.profile.firstName} ${currentAuthor.attributes.profile.lastName}` : ''; - const authorAvatar = 'https://placehold.it/44x44'; return (
- {authorName} +
diff --git a/src/components/Avatar/Avatar.css b/src/components/Avatar/Avatar.css index 6cf812bf..ad512abe 100644 --- a/src/components/Avatar/Avatar.css +++ b/src/components/Avatar/Avatar.css @@ -1,3 +1,5 @@ .avatar { border-radius: 50%; + width: 100%; + height: 100%; } diff --git a/src/components/Avatar/Avatar.js b/src/components/Avatar/Avatar.js index ae94ca83..c5932dbd 100644 --- a/src/components/Avatar/Avatar.js +++ b/src/components/Avatar/Avatar.js @@ -1,16 +1,14 @@ import React, { PropTypes } from 'react'; import classNames from 'classnames'; +import avatarPlaceholder from './images/wireframeAvatar.svg'; import css from './Avatar.css'; const Avatar = props => { const { className, name } = props; - - // TODO hard coded placeholder image need to be changed to something else - const avatarImageURL = 'http://placehold.it/44x44'; const classes = classNames(css.avatar, className); - return {name}; + return {name}; }; const { string } = PropTypes; diff --git a/src/components/Avatar/images/wireframeAvatar.svg b/src/components/Avatar/images/wireframeAvatar.svg new file mode 100644 index 00000000..1f96fb7f --- /dev/null +++ b/src/components/Avatar/images/wireframeAvatar.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/components/OrderDetailsPanel/OrderDetailsPanel.css b/src/components/OrderDetailsPanel/OrderDetailsPanel.css index a7f36bc7..49e4e32d 100644 --- a/src/components/OrderDetailsPanel/OrderDetailsPanel.css +++ b/src/components/OrderDetailsPanel/OrderDetailsPanel.css @@ -15,8 +15,8 @@ .avatarWrapper { display: block; - flex-basis: 44px; - width: 44px; - height: 44px; + flex-basis: 48px; + width: 48px; + height: 48px; margin-right: 1rem; } diff --git a/src/components/SaleDetailsPanel/SaleDetailsPanel.css b/src/components/SaleDetailsPanel/SaleDetailsPanel.css index 1d697cfb..c17bea4a 100644 --- a/src/components/SaleDetailsPanel/SaleDetailsPanel.css +++ b/src/components/SaleDetailsPanel/SaleDetailsPanel.css @@ -21,7 +21,7 @@ .avatarWrapper { display: block; - flex-basis: 44px; - width: 44px; - height: 44px; + flex-basis: 48px; + width: 48px; + height: 48px; } diff --git a/src/containers/InboxPage/InboxPage.js b/src/containers/InboxPage/InboxPage.js index 4e225ce7..634433dc 100644 --- a/src/containers/InboxPage/InboxPage.js +++ b/src/containers/InboxPage/InboxPage.js @@ -2,7 +2,7 @@ import React, { PropTypes } from 'react'; import { compose } from 'redux'; import { connect } from 'react-redux'; import { FormattedMessage, injectIntl, intlShape } from 'react-intl'; -import { PageLayout, NamedRedirect, NamedLink, PaginationLinks } from '../../components'; +import { Avatar, NamedLink, NamedRedirect, PageLayout, PaginationLinks } from '../../components'; import * as propTypes from '../../util/propTypes'; import { getMarketplaceEntities } from '../../ducks/marketplaceData.duck'; import { loadData } from './InboxPage.duck'; @@ -53,7 +53,6 @@ export const InboxItem = props => { const { customer, provider } = tx; const isOrder = type === 'order'; const otherUserName = username(isOrder ? provider : customer); - const otherUserAvatar = 'https://placehold.it/44x44'; const changedDate = timestamp(intl, tx); return ( { params={{ id: tx.id.uuid }} >
- {otherUserName} +
diff --git a/src/containers/InboxPage/__snapshots__/InboxPage.test.js.snap b/src/containers/InboxPage/__snapshots__/InboxPage.test.js.snap index 46771dd0..90688d63 100644 --- a/src/containers/InboxPage/__snapshots__/InboxPage.test.js.snap +++ b/src/containers/InboxPage/__snapshots__/InboxPage.test.js.snap @@ -150,8 +150,8 @@ exports[`InboxPage matches snapshot 2`] = ` className={undefined}> provider-user-id first name provider-user-id last name + className="" + src="wireframeAvatar.svg" />
@@ -326,8 +326,8 @@ exports[`InboxPage matches snapshot 4`] = ` className={undefined}> customer-user-id first name customer-user-id last name + className="" + src="wireframeAvatar.svg" />
diff --git a/src/translations/en.json b/src/translations/en.json index 04b353d4..72d62c5c 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -55,6 +55,7 @@ "InboxPage.statePending": "Pending", "InboxPage.stateRejected": "Rejected", "InboxPage.title": "Inbox", + "ListingCard.hostedBy": "Hosted by {authorName}.", "ListingPage.ctaButtonMessage": "Book {title}", "ListingPage.loadingListingData": "Loading listing data", "ListingPage.noListingData": "Could not find listing data",