From 0fda8907e791596c44bb867253da472aa2416fb7 Mon Sep 17 00:00:00 2001 From: Abhi Shandilya Date: Sat, 11 May 2024 21:41:59 -0400 Subject: [PATCH] fix: show related items on pinned items (#1157) * fix: show related items on pinned items * fix condition * use subName since sub could be undefined * Update components/item-full.js Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Revert "Update components/item-full.js" This reverts commit d1b785b8490c9356548ef1bfe246ae526f0237c6. --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- components/item-full.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/components/item-full.js b/components/item-full.js index 226f1469..0b440c94 100644 --- a/components/item-full.js +++ b/components/item-full.js @@ -161,7 +161,19 @@ function TopLevelItem ({ item, noReply, ...props }) { {!noReply && <> 3 ? 'fractions of a penny for your thoughts?' : 'early comments get more zaps'} onCancelQuote={cancelQuote} onQuoteReply={quoteReply} quote={quote} /> - {!item.position && !item.isJob && !item.parentId && !item.deletedAt && !(item.bounty > 0) && } + { + // Don't show related items for Saloon items (position is set but no subName) + (!item.position && item.subName) && + // Don't show related items for jobs + !item.isJob && + // Don't show related items for child items + !item.parentId && + // Don't show related items for deleted items + !item.deletedAt && + // Don't show related items for items with bounties, show past bounties instead + !(item.bounty > 0) && + + } {item.bounty > 0 && } }