From 1a36aadf83ccbb5ff86f027cc9109bfa9dbe75bc Mon Sep 17 00:00:00 2001
From: eug-vs <eug-vs@keemail.me>
Date: Sun, 5 Jul 2020 14:23:21 +0300
Subject: feat: allow feedback to have empty message

---
 src/components/ReviewCard/ReviewCard.tsx | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

(limited to 'src/components/ReviewCard/ReviewCard.tsx')

diff --git a/src/components/ReviewCard/ReviewCard.tsx b/src/components/ReviewCard/ReviewCard.tsx
index 97581fc..2016a5e 100644
--- a/src/components/ReviewCard/ReviewCard.tsx
+++ b/src/components/ReviewCard/ReviewCard.tsx
@@ -30,12 +30,16 @@ const ReviewCard: React.FC<PropTypes> = ({ feedback }) => {
         user={feedback.author}
         info={<Rating value={feedback.score} readOnly size="small" />}
       />
-      <Divider />
-      <CardContent>
-        <Typography>
-          {feedback.contents}
-        </Typography>
-      </CardContent>
+      {feedback.contents && (
+        <>
+          <Divider />
+          <CardContent>
+            <Typography>
+              {feedback.contents}
+            </Typography>
+          </CardContent>
+        </>
+      )}
     </Card>
   );
 };
-- 
cgit v1.2.3

