Skip to content

Commit

Permalink
[Kan 127] 마이페이지 내 리뷰 모양 수정 (#36)
Browse files Browse the repository at this point in the history
* Fix

* Fix/mypage review
  • Loading branch information
sjsjmine129 authored Jun 1, 2024
1 parent d1ffd19 commit a2c17c3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 33 deletions.
15 changes: 7 additions & 8 deletions src/components/MyReview.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,11 @@ export default function MyReview(props) {
));

return (
<View style={styles.myReview}>
<Text style={styles.myReviewTitle}>내 리뷰</Text>
{myReviews.length === 0 ? (
<Text style={styles.noReviewText}>리뷰가 없습니다</Text>
) : (
<>
<>
{myReviews.length === 0 ? null : (
<View style={styles.myReview}>
<Text style={styles.myReviewTitle}>내가 작성한 리뷰</Text>

<ScrollView
showsVerticalScrollIndicator={false}
showsHorizontalScrollIndicator={false}
Expand Down Expand Up @@ -83,9 +82,9 @@ export default function MyReview(props) {
}}>
{Indicator}
</View>
</>
</View>
)}
</View>
</>
);
}

Expand Down
37 changes: 12 additions & 25 deletions src/components/StoreCompoForR.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable react-native/no-inline-styles */
import React, {useState, useContext, useEffect} from 'react';
import {View, Text, StyleSheet, Pressable, ScrollView} from 'react-native';
import {
Expand Down Expand Up @@ -96,7 +97,7 @@ export default function StoreCompoForR(props) {
}}>
<SvgXml xml={svgXml.icon.star} width="15" height="15" style={{}} />
<Text style={styles.reviewText}>
{storeInfo.ratingAvg} ({storeInfo.reviewCount})
{storeInfo.ratingAvg.toFixed(1)} ({storeInfo.reviewCount})
</Text>
<SvgXml
xml={svgXml.icon.heart}
Expand All @@ -109,11 +110,16 @@ export default function StoreCompoForR(props) {
<Text style={styles.reviewerName}>
{storeData.firstReview.reviewer + '님'}
</Text>
<ScrollView style={styles.reviewContent}>
<Text style={styles.reviewBody}>
{storeData.firstReview.body}
</Text>
</ScrollView>
<Text
numberOfLines={4}
style={{
fontSize: 11,
color: COLOR_TEXT60GRAY,
fontFamily: 'NanumSquareRoundR',
width: 245,
}}>
{storeData.firstReview.body}
</Text>
</View>
</View>
</Pressable>
Expand Down Expand Up @@ -171,23 +177,4 @@ const styles = StyleSheet.create({
marginVertical: 6,
marginBottom: 10,
},
// reviewContent: {
// fontSize: 14,
// color: COLOR_TEXT_BLACK,
// fontFamily: 'NanumSquareRoundB',
// },
reviewContent: {
fontSize: 14,
color: COLOR_TEXT_BLACK,
fontFamily: 'NanumSquareRoundB',
marginTop: 4,
maxHeight: 180,
padding: 4,
},
reviewBody: {
fontSize: 15,
color: COLOR_TEXT70GRAY,
flexWrap: 'wrap',
marginRight: 10,
},
});

0 comments on commit a2c17c3

Please sign in to comment.