From 14561d6a881ce131f7fd49a55df4a5bf1860b9a1 Mon Sep 17 00:00:00 2001
From: KimChungO
- {star >= 1 ? (
+ {item.star >= 1 ? (
) : (
)}
- {star >= 2 ? (
+ {item.star >= 2 ? (
) : (
)}
- {star >= 3 ? (
+ {item.star >= 3 ? (
) : (
)}
- {star >= 4 ? (
+ {item.star >= 4 ? (
) : (
)}
- {star === 5 ? (
+ {item.star >= 5 ? (
) : (
@@ -196,6 +203,8 @@ const Comment = ({ item, styled, reviewsubmit, reviewEdit, setReviewEdit }) => {
reviewsubmit={reviewsubmit}
reviewEdit={reviewEdit}
setReviewEdit={setReviewEdit}
+ sort={sort}
+ setSort={setSort}
/>
) : null}
diff --git a/src/components/molecules/CommentForm.js b/src/components/molecules/CommentForm.js
index 31e19ec..63effbb 100644
--- a/src/components/molecules/CommentForm.js
+++ b/src/components/molecules/CommentForm.js
@@ -15,11 +15,15 @@ const CommentFormBox = styled.div`
form {
display: flex;
}
- .buttonBox {
+ .submitBox {
width: 100%;
display: flex;
justify-content: space-between;
}
+ .buttonBox {
+ display: flex;
+ gap: 20px;
+ }
.editBox {
width: 100%;
display: flex;
@@ -36,11 +40,13 @@ const CommentForm = ({
sort,
type,
IsEdit,
+ star,
}) => {
const [reviewText, setreviewText] = useState("");
const submit = () => {
reviewsubmit(reviewText);
};
+
return (