aboutsummaryrefslogtreecommitdiff
path: root/src/components/ReviewCard/ReviewCard.tsx
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2020-07-05 14:23:21 +0300
committereug-vs <eug-vs@keemail.me>2020-07-05 14:23:21 +0300
commit1a36aadf83ccbb5ff86f027cc9109bfa9dbe75bc (patch)
tree1fabf41468e95c3ab963c764d3b08b7099e255e4 /src/components/ReviewCard/ReviewCard.tsx
parent7138b0ef5eae5d5116a31898f90bc995452d93f8 (diff)
downloadwhich-ui-1a36aadf83ccbb5ff86f027cc9109bfa9dbe75bc.tar.gz
feat: allow feedback to have empty message
Diffstat (limited to 'src/components/ReviewCard/ReviewCard.tsx')
-rw-r--r--src/components/ReviewCard/ReviewCard.tsx16
1 files changed, 10 insertions, 6 deletions
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>
);
};