Skip to content

Commit

Permalink
(design): Do not show organization if the item does not have one
Browse files Browse the repository at this point in the history
Signed-off-by: Milan Lakhani <[email protected]>
  • Loading branch information
milanlakhani authored and Milan Lakhani committed Nov 15, 2022
1 parent 098cb59 commit 816bd9d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/CardRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module.exports.renderDefaultCard = function renderDefaultCard({item}) {
<div class="mosaic-info">
<div class="mosaic-title">
<h5>${item.display_name ? h(item.display_name) : h(item.name)}</h5>
${h(item.organization)}
${item.organization ? h(item.organization) : ""}
</div>
<div class="mosaic-stars">
${_.isNumber(item.stars) && item.stars ?
Expand Down
4 changes: 2 additions & 2 deletions src/components/ItemDialogContentRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -653,8 +653,8 @@ module.exports.render = function({settings, tweetsCount, itemInfo}) {
const productInfo = `
<div class="product-main">
<div class="product-name">${h(itemInfo.name)}</div>
<div class="product-parent"><a data-type=internal href="${linkToOrganization}">
<span>${h(itemInfo.organization)}</span>${renderMemberTag(itemInfo)}</a></div>
${itemInfo.organization ? `<div class="product-parent"><a data-type=internal href="${linkToOrganization}">
<span>${h(itemInfo.organization)}</span>${renderMemberTag(itemInfo)}</a></div>` : ""}
${productPaths.map( (productPath) => `
<div class="product-category">${renderItemCategory({path: productPath, itemInfo})}</div>
`).join('')}
Expand Down

0 comments on commit 816bd9d

Please sign in to comment.