aboutsummaryrefslogtreecommitdiff
path: root/src/containers/Home/Home.tsx
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2020-10-09 03:26:42 +0300
committereug-vs <eug-vs@keemail.me>2020-10-09 03:26:42 +0300
commit6514ed55e3f608f468e103cacad547aed276b8bf (patch)
tree96b21497f893e52c7a3576fbd0c16fa97d74ee6b /src/containers/Home/Home.tsx
parentfbb0a7fd921c4f2675147f0f8bc08a221b736a53 (diff)
downloadwhich-ui-6514ed55e3f608f468e103cacad547aed276b8bf.tar.gz
feat: display version chip on ReviewCard
Diffstat (limited to 'src/containers/Home/Home.tsx')
-rw-r--r--src/containers/Home/Home.tsx7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/containers/Home/Home.tsx b/src/containers/Home/Home.tsx
index 71b902b..4fd2833 100644
--- a/src/containers/Home/Home.tsx
+++ b/src/containers/Home/Home.tsx
@@ -38,8 +38,9 @@ const useStyles = makeStyles(theme => ({
marginLeft: theme.spacing(2)
},
reviews: {
+ margin: 'auto',
[theme.breakpoints.up('md')]: {
- padding: theme.spacing(0, 10)
+ width: '70%'
}
}
}));
@@ -75,7 +76,7 @@ const Home: React.FC = () => {
);
const FeedbackSection = feedbacks && feedbacks.findIndex(
- (feedback: Feedback) => feedback.author._id === user?._id
+ (feedback: Feedback) => (feedback.author._id === user?._id && feedback.version === release?.version)
) >= 0 ? (
<p>
You have already left feedback for this version.
@@ -88,7 +89,7 @@ const Home: React.FC = () => {
Here you can share your thougts about Which with us!
Note that you can ony leave feedback once per application version (there will be plenty of them later).
</p>
- {isAuthenticated ? <ReviewForm /> : (
+ {isAuthenticated ? <ReviewForm version={release?.version || 'N/A'} /> : (
<>
<p> You must be authorized to leave feedback.</p>
<Button