{
setTimeout(() => {
@@ -8,9 +8,9 @@ function Progress({ percent }) {
}, 1000);
}, [percent]);
return (
-
+
diff --git a/src/components/Search/index.js b/src/components/Search/index.js
index bc94a64..25a8936 100644
--- a/src/components/Search/index.js
+++ b/src/components/Search/index.js
@@ -1,46 +1,28 @@
import React from "react";
import _ from "lodash";
+import searchIcon from "./search.png";
-const langDetector = (lang = "fa", option1, option2) => {
+const langDetector = (lang = 'fa', option1, option2) => {
return lang === "fa" ? option1 : option2;
};
-export default function Search({
- lang,
- backgroundColor,
- borderColor,
- textColor,
- icon,
-}) {
+export default function Search(props) {
return (
-
-
-
+
+
diff --git a/src/components/Search/search.png b/src/components/Search/search.png
new file mode 100644
index 0000000..81d586c
Binary files /dev/null and b/src/components/Search/search.png differ
diff --git a/src/components/StarRating/index.js b/src/components/StarRating/index.js
index 7fd1e0e..458feb9 100644
--- a/src/components/StarRating/index.js
+++ b/src/components/StarRating/index.js
@@ -1,15 +1,26 @@
import React, { useState } from "react";
import StarRatingComponent from "react-star-rating-component";
+import starGrayIcon from '../../assets/icons/starGray.svg';
+import starYellowIcon from '../../assets/icons/starYellow.svg';
function StarRating() {
const [rate, setRating] = useState(2);
return (
{
+ if (index <= value){
+ return (
+
+ );
+ }
+ return ();
+ }}
+
value={rate}
+ size='35'
onStarHover={(value) => setRating(value)}
-
/>
);
}
diff --git a/src/views/Product/Desktop/ProductOverAll/index.js b/src/views/Product/Desktop/ProductOverAll/index.js
index 0734618..83bb1c3 100644
--- a/src/views/Product/Desktop/ProductOverAll/index.js
+++ b/src/views/Product/Desktop/ProductOverAll/index.js
@@ -109,7 +109,7 @@ export const ProductOverAll = ({
-
+
diff --git a/src/views/Product/Desktop/index.js b/src/views/Product/Desktop/index.js
index dcea734..b00095a 100644
--- a/src/views/Product/Desktop/index.js
+++ b/src/views/Product/Desktop/index.js
@@ -15,8 +15,8 @@ const DesktopProductLayout = () =>{
-
-
+
+
diff --git a/src/views/Product/Rate/index.js b/src/views/Product/Rate/index.js
index 8fc68ae..ccc0df6 100644
--- a/src/views/Product/Rate/index.js
+++ b/src/views/Product/Rate/index.js
@@ -2,21 +2,34 @@ import React from "react";
import StarRating from "../../../components/StarRating";
import Progress from "../../../components/Progress";
-function Rate({ avarage, all, fields }) {
+function Rate({ avarage, all, fields, desktop }) {
return (
-
- {avarage}
-
+ {
+ desktop ?
+
+ {avarage}
+
+ :
+
+ {avarage}
+
+ }
+
+
{all}
{fields.map((item, index) => (
-
{item.name}
-
+
+ {
+ desktop ? :
+ }
+
{item.percent + "%"}
))}
@@ -33,23 +46,23 @@ Rate.defaultProps = {
fields: [
{
name: "5 ستاره",
- percent: 50,
+ percent: 49,
},
{
name: "4 ستاره",
- percent: 50,
+ percent: 31,
},
{
name: "3 ستاره",
- percent: 50,
+ percent: 9,
},
{
name: "2 ستاره",
- percent: 50,
+ percent: 5,
},
{
name: "1 ستاره",
- percent: 50,
+ percent: 6,
},
],
};