From 77021f359a417142934dc1667a1efd68197cded5 Mon Sep 17 00:00:00 2001 From: Pkpedram Date: Mon, 31 Jan 2022 12:03:15 +0330 Subject: [PATCH 1/5] Comments Section Fixed --- src/components/Comments/index.js | 2 +- src/components/QandA/index.js | 16 ++++++++-------- src/views/Home/Desktop/Part2/index.js | 4 ++-- src/views/Home/Desktop/index.js | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/components/Comments/index.js b/src/components/Comments/index.js index 301166c..4ebcebb 100644 --- a/src/components/Comments/index.js +++ b/src/components/Comments/index.js @@ -68,7 +68,7 @@ export const Comments = ({ comments }) => { )} -

{comment.text}

+

{comment.text}

{/*
diff --git a/src/components/QandA/index.js b/src/components/QandA/index.js index 95c4cf1..b0463cd 100644 --- a/src/components/QandA/index.js +++ b/src/components/QandA/index.js @@ -9,18 +9,18 @@ import Button from "../Button"; const QandA = ({ comments }) => { const Comment = ({ comment }) => { const [open, Setopen] = useState(true); - const [viewmore, setViewMore] = useState("مشاهده باسخ های بیشتر"); + const [viewmore, setViewMore] = useState("مشاهده پاسخ های بیشتر"); const [numberOfAnswers, setNumberOfAnswers] = useState(1); const [isOpen, setIsOpen] = useState(false); return ( <> -
+
{comment.username} {comment.isCostumer ? ( -

خریدار محصول

+

خریدار محصول

) : null}
@@ -43,7 +43,7 @@ const QandA = ({ comments }) => {
-

برسش

+

پرسش

@@ -63,7 +63,7 @@ const QandA = ({ comments }) => {
-

باسخ

+

پاسخ

@@ -81,7 +81,7 @@ const QandA = ({ comments }) => {
-

ارسال باسخ

+

ارسال پاسخ

@@ -102,12 +102,12 @@ const QandA = ({ comments }) => { isOpen ? () => { setNumberOfAnswers(1); - setViewMore("مشاهده باسخ های بیشتر"); + setViewMore("مشاهده پاسخ های بیشتر"); setIsOpen(false); } : () => { setNumberOfAnswers(comment.answers.length); - setViewMore("بستن باسخ ها"); + setViewMore("بستن پاسخ ها"); setIsOpen(true); } } diff --git a/src/views/Home/Desktop/Part2/index.js b/src/views/Home/Desktop/Part2/index.js index 160f616..c773ef3 100644 --- a/src/views/Home/Desktop/Part2/index.js +++ b/src/views/Home/Desktop/Part2/index.js @@ -23,7 +23,7 @@ const Part2 = ( }, []); return (
@@ -39,7 +39,7 @@ const Part2 = ( backgroundColor="bg-blue-100" border={{ color: "#196EC055", - width: "0px", + width: "0px", }} width="100%" selectable={true} diff --git a/src/views/Home/Desktop/index.js b/src/views/Home/Desktop/index.js index 575b805..4493a38 100644 --- a/src/views/Home/Desktop/index.js +++ b/src/views/Home/Desktop/index.js @@ -8,7 +8,7 @@ import SalesContainer from "../../../components/SalesContainer"; import { book, publicApi } from "../../../redux/actions"; import Part2 from "./Part2"; -import HomeImg from '../../../assets/images/HomeImg.svg'; +import HomeImg from '../../../assets/images/HomeImg.png'; import Part4 from "./Part4"; import Design2D from "../../../components/Design2D"; From 6eff5ac14714204b546a83d35d4243c416474f7b Mon Sep 17 00:00:00 2001 From: Pkpedram Date: Mon, 31 Jan 2022 12:06:55 +0330 Subject: [PATCH 2/5] View Sample Fixed --- src/views/Product/Desktop/ProductOverAll/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/Product/Desktop/ProductOverAll/index.js b/src/views/Product/Desktop/ProductOverAll/index.js index ce2e3c4..0734618 100644 --- a/src/views/Product/Desktop/ProductOverAll/index.js +++ b/src/views/Product/Desktop/ProductOverAll/index.js @@ -95,13 +95,13 @@ export const ProductOverAll = ({ title="مشاهده نمونه" backgroundColor={isDark ? "bg-transparent" : "bg-white"} border={{ - color: isDark ? "#ffffff55" : "#C01919", + color: isDark ? "#ffffff55" : "rgba(192,57,25,0.24)", width: "1px", }} width="24%" radius={false} twPaddings="py-4 px-6" - color={isDark ? "text-white" : "text-red19"} + color={isDark ? "text-white" : "font-bold text-red19"} onClick={() => {}} />
From 727949f47070fc58878d129e74398ce24d91ca61 Mon Sep 17 00:00:00 2001 From: Pkpedram Date: Mon, 31 Jan 2022 12:18:09 +0330 Subject: [PATCH 3/5] Contact Us Page Done --- src/views/Contact/index.js | 6 +++--- src/views/Product/Desktop/index.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/views/Contact/index.js b/src/views/Contact/index.js index c52b3b4..27f6395 100644 --- a/src/views/Contact/index.js +++ b/src/views/Contact/index.js @@ -48,8 +48,8 @@ function Contact({ headerOptions, setHeaderOptions, info, isMobile, isDark }) { return (
-
+
diff --git a/src/views/Product/Desktop/index.js b/src/views/Product/Desktop/index.js index 1900767..dcea734 100644 --- a/src/views/Product/Desktop/index.js +++ b/src/views/Product/Desktop/index.js @@ -9,7 +9,7 @@ import QandA from "../../../components/QandA"; const DesktopProductLayout = () =>{ return ( -
+
From 7668a41592567a48d68c3ed90b93a5d0a8f99cc9 Mon Sep 17 00:00:00 2001 From: Pkpedram Date: Mon, 31 Jan 2022 12:41:20 +0330 Subject: [PATCH 4/5] specifications hover Done --- src/components/ProductTab/table/index.css | 6 ++++++ src/components/ProductTab/table/index.js | 12 +++++++----- src/router.js | 2 +- 3 files changed, 14 insertions(+), 6 deletions(-) create mode 100644 src/components/ProductTab/table/index.css diff --git a/src/components/ProductTab/table/index.css b/src/components/ProductTab/table/index.css new file mode 100644 index 0000000..f8240a0 --- /dev/null +++ b/src/components/ProductTab/table/index.css @@ -0,0 +1,6 @@ +.specifications-li:hover div{ + background-color: rgba(25,110,192,0.2); +} +.specifications-li div{ + transition: all 0.2s; +} \ No newline at end of file diff --git a/src/components/ProductTab/table/index.js b/src/components/ProductTab/table/index.js index 39fda4a..f688760 100644 --- a/src/components/ProductTab/table/index.js +++ b/src/components/ProductTab/table/index.js @@ -1,4 +1,5 @@ -import React from "react"; +import React, { useState } from "react"; +import './index.css'; const persian = { weight: "وزن", @@ -12,17 +13,18 @@ const persian = { }; const Table = ({ specifications }) => { + return ( -
    +
      {Object.keys(specifications).map((specification, index) => ( -
    • +
    • {persian[specification]}
      -
      +
      {specifications[specification]}
    • diff --git a/src/router.js b/src/router.js index 123c4cc..f2966ac 100644 --- a/src/router.js +++ b/src/router.js @@ -363,7 +363,7 @@ function Router({ title: false, back: false, shown: true, - menu: false, + menu: true, }} /> } From 642f14406c246b6b8ef176cf9514d99c3fd5b434 Mon Sep 17 00:00:00 2001 From: Pkpedram Date: Mon, 31 Jan 2022 16:05:40 +0330 Subject: [PATCH 5/5] Product Page Issues Fixed --- src/assets/icons/starGray.svg | 8 ++++ src/assets/icons/starYellow.svg | 8 ++++ src/components/Button/index.js | 2 +- src/components/Navbar/index.js | 10 ++--- src/components/ProductTab/table/index.css | 2 +- src/components/Progress/index.js | 6 +-- src/components/Search/index.js | 36 +++++------------- src/components/Search/search.png | Bin 0 -> 857 bytes src/components/StarRating/index.js | 15 +++++++- .../Product/Desktop/ProductOverAll/index.js | 6 +-- src/views/Product/Desktop/index.js | 4 +- src/views/Product/Rate/index.js | 33 +++++++++++----- 12 files changed, 76 insertions(+), 54 deletions(-) create mode 100644 src/assets/icons/starGray.svg create mode 100644 src/assets/icons/starYellow.svg create mode 100644 src/components/Search/search.png diff --git a/src/assets/icons/starGray.svg b/src/assets/icons/starGray.svg new file mode 100644 index 0000000..c9803c8 --- /dev/null +++ b/src/assets/icons/starGray.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/assets/icons/starYellow.svg b/src/assets/icons/starYellow.svg new file mode 100644 index 0000000..a79a67c --- /dev/null +++ b/src/assets/icons/starYellow.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/components/Button/index.js b/src/components/Button/index.js index 7262f1a..f205980 100644 --- a/src/components/Button/index.js +++ b/src/components/Button/index.js @@ -20,7 +20,7 @@ export default function Button({ className={`${radius == false ? '' : 'rounded-md'} ${twPaddings? twPaddings : 'py-3'} ${customStyle} justify-center text-sm lg:text-tiny cursor-pointer lg:py-4 ${ selectable ? (active ? "bg-black" : backgroundColor) : backgroundColor } ${selectable ? (active ? "text-blueC0" : color) : color} ${ - selectable ? (active ? "bg-opacity-10" : bgOpacity) : bgOpacity + selectable ? (active ? "bg-blue-100" : bgOpacity) : bgOpacity } `} style={{ border: `${ diff --git a/src/components/Navbar/index.js b/src/components/Navbar/index.js index 7e8ead5..d1e4424 100644 --- a/src/components/Navbar/index.js +++ b/src/components/Navbar/index.js @@ -228,7 +228,7 @@ function Navbar({
) : (
-
+
{/* انتخاب کشور @@ -251,7 +251,7 @@ function Navbar({
-
+
@@ -267,8 +267,8 @@ function Navbar({ style={{ maxWidth: "calc(100vw / 2)" }} >
@@ -284,7 +284,7 @@ function Navbar({
{ 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 0000000000000000000000000000000000000000..81d586c7fa7862e5d51c832c1c1a94814283778a GIT binary patch literal 857 zcmV-f1E&0mP)(+L_Ts5c;; zpmc)L3DW=bJ>?Wfw(L0WrFZD=9SN57KK*)6eoAt3#4R~uwv$0{v)SyUEpD=2uix`I zNs^WRyz2Xp`F#F5WbwV>1av3Ishr-(Dxj9O6l|&fU-tp+43}jYK!t1~`y*SLq0Y)V zS3jNu4LoB$prj!4q9`8wC>e#5GaLammHm?C0$Fr*Vz6`dCj{8?dyVIBw6($+*mqNF zrb%(KS2N{Ndo8=wRAp?UMmPiesR`(F(`B-lGtGIfJ^-@S0P?x91>ro!E;KUjx(zWn zp4;50b|$-Oo4X0_iv~_@a8&*-P<|f+e9`}Y%PyNTc?Zs7gE$)$V=-V$lxOw(EVw+> zKLp2sQw<q-}kpQEs<|s_P zYxz8l!4aTOp;e3}p|@Kk#@6Ay*;X$RqUX;cK`nC;WhXI0aGX8mApv4@36Qr&D_o`y zg}|ck+nBSy&jnYBA>XM#)>kgqgHLa8HEFvjNB#9pwv#n|x2bP`!I2OYq=eR{{Wl3g zQOOD(>nrH1M4$dr&F$FE5mtYFQD2=2?y`@AA$h`<^-bYj15hmuEvBgw<^@a{&9Q=#2XBI- zpe42^O+K37xOo8<555OTzfzGoNLUJfo&G%6}St{b6;1#6Pz1l7m{4x+3t7VWTp3+Wa7MZ z4Ji2z7qH$9YzMFxoWC;LZg;Au-ZK&iHCIjBRadA9aBsM}gQ4F&z)b;gG;kK%Q{vgh j@lnAIN{FFb*LVD1*@<&E6n{BQ00000NkvXXu0mjfUL%A| literal 0 HcmV?d00001 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, }, ], };