From fe38d6d5bb36e18ddefbe490cc21f48f4f4c8d81 Mon Sep 17 00:00:00 2001
From: Gabin Aureche <gabin.aureche@live.fr>
Date: Mon, 13 Mar 2017 13:25:08 +0100
Subject: Add pinned posts (#4217)

---
 webapp/components/search_results_item.jsx | 13 +++++++++++++
 1 file changed, 13 insertions(+)

(limited to 'webapp/components/search_results_item.jsx')

diff --git a/webapp/components/search_results_item.jsx b/webapp/components/search_results_item.jsx
index b3de3492c..1c7309f51 100644
--- a/webapp/components/search_results_item.jsx
+++ b/webapp/components/search_results_item.jsx
@@ -289,6 +289,18 @@ export default class SearchResultsItem extends React.Component {
             );
         }
 
+        let pinnedBadge;
+        if (post.is_pinned) {
+            pinnedBadge = (
+                <span className='post__pinned-badge'>
+                    <FormattedMessage
+                        id='post_info.pinned'
+                        defaultMessage='Pinned'
+                    />
+                </span>
+            );
+        }
+
         return (
             <div className='search-item__container'>
                 <div className='date-separator'>
@@ -322,6 +334,7 @@ export default class SearchResultsItem extends React.Component {
                                 {botIndicator}
                                 <li className='col'>
                                     {this.renderTimeTag(post)}
+                                    {pinnedBadge}
                                     {flagContent}
                                 </li>
                                 {rhsControls}
-- 
cgit v1.2.3-1-g7c22

