From 79d627ed4744e321e39615794a571a620966ebb0 Mon Sep 17 00:00:00 2001 From: mahdi Date: Wed, 11 May 2022 11:29:46 +0430 Subject: [PATCH] update 2 files and delete 7 files --- .../images}/card-remove.svg | 0 .../images}/gray-upward-icon.svg | 0 .../images}/heart-emoji.svg | 0 .../Feedback => public/images}/sad-emoji.svg | 0 .../images}/smile-emoji.svg | 0 .../images}/speechless-emoji.svg | 0 .../images}/suspicious-emoji.svg | 0 src/components/Features/index.js | 53 ++++++++------- src/components/Feedback/index.js | 64 ++++++++++--------- 9 files changed, 61 insertions(+), 56 deletions(-) rename {src/components/Feedback => public/images}/card-remove.svg (100%) rename {src/components/Feedback => public/images}/gray-upward-icon.svg (100%) rename {src/components/Feedback => public/images}/heart-emoji.svg (100%) rename {src/components/Feedback => public/images}/sad-emoji.svg (100%) rename {src/components/Feedback => public/images}/smile-emoji.svg (100%) rename {src/components/Feedback => public/images}/speechless-emoji.svg (100%) rename {src/components/Feedback => public/images}/suspicious-emoji.svg (100%) diff --git a/src/components/Feedback/card-remove.svg b/public/images/card-remove.svg similarity index 100% rename from src/components/Feedback/card-remove.svg rename to public/images/card-remove.svg diff --git a/src/components/Feedback/gray-upward-icon.svg b/public/images/gray-upward-icon.svg similarity index 100% rename from src/components/Feedback/gray-upward-icon.svg rename to public/images/gray-upward-icon.svg diff --git a/src/components/Feedback/heart-emoji.svg b/public/images/heart-emoji.svg similarity index 100% rename from src/components/Feedback/heart-emoji.svg rename to public/images/heart-emoji.svg diff --git a/src/components/Feedback/sad-emoji.svg b/public/images/sad-emoji.svg similarity index 100% rename from src/components/Feedback/sad-emoji.svg rename to public/images/sad-emoji.svg diff --git a/src/components/Feedback/smile-emoji.svg b/public/images/smile-emoji.svg similarity index 100% rename from src/components/Feedback/smile-emoji.svg rename to public/images/smile-emoji.svg diff --git a/src/components/Feedback/speechless-emoji.svg b/public/images/speechless-emoji.svg similarity index 100% rename from src/components/Feedback/speechless-emoji.svg rename to public/images/speechless-emoji.svg diff --git a/src/components/Feedback/suspicious-emoji.svg b/public/images/suspicious-emoji.svg similarity index 100% rename from src/components/Feedback/suspicious-emoji.svg rename to public/images/suspicious-emoji.svg diff --git a/src/components/Features/index.js b/src/components/Features/index.js index 53d8267..51a78ca 100644 --- a/src/components/Features/index.js +++ b/src/components/Features/index.js @@ -1,33 +1,31 @@ import React from "react"; +import Button from "../ButtonDesign/Button"; -const Features = ({ features }) => { +const Features = ({ featureTitle, features }) => { return ( -
-

- امکانات و ویژگی ها +
+

+ {featureTitle}

{features.map((feature, index) => ( -
+
- + icon
- - {feature.title} - - - {feature.status} - + {feature.title} + {feature.status && ( + + {feature.status} + + )}

{feature.content} @@ -36,23 +34,22 @@ const Features = ({ features }) => {

))}
+ {/* footer */}
-

هزاران درصد تحفیف

+

هزاران درصد تحفیف

با وارد کردن کد بهار نگو تابستون از تخفیف 10 درصدی ویژه برخوردار شوید

- +
); @@ -61,6 +58,8 @@ const Features = ({ features }) => { export default Features; Features.defaultProps = { + featureTitle: "امکانات و ویژگی ها", + features: [ { icon: "images/crown-icon.svg", @@ -106,7 +105,7 @@ Features.defaultProps = { icon: "images/plane.svg", iconBgColor: "#E5FFC4", title: "نحوه ارسال جعبه خاطرات", - status: "جدید", + status: null, content: "قابلیت امتیاز دهی به مطالب از جمله امکانات این سامانه می باشد تا به جامعه هدف کارکنان کمک نمایید.", }, diff --git a/src/components/Feedback/index.js b/src/components/Feedback/index.js index 309e048..3080485 100644 --- a/src/components/Feedback/index.js +++ b/src/components/Feedback/index.js @@ -1,27 +1,25 @@ import React, { useState } from "react"; -import removeCard from "../../assets/icons/card-remove.svg"; +import removeCard from "./card-remove.svg"; -import sadEmoji from "../../assets/icons/sad-emoji.svg"; -import smileEmoji from "../../assets/icons/smile-emoji.svg"; -import speechlessEmoji from "../../assets/icons/speechless-emoji.svg"; -import suspiciousEmoji from "../../assets/icons/suspicious-emoji.svg"; -import heartEmoji from "../../assets/icons/heart-emoji.svg"; -import upwardArrow from "../../assets/icons/gray-upward-icon.svg"; -import Button from "../Button"; +import sadEmoji from "./sad-emoji.svg"; +import smileEmoji from "./smile-emoji.svg"; +import speechlessEmoji from "./speechless-emoji.svg"; +import suspiciousEmoji from "./suspicious-emoji.svg"; +import heartEmoji from "./heart-emoji.svg"; +import upwardArrow from "./gray-upward-icon.svg"; const Feedback = ({ feedbacks }) => { const [closeModal, setCloseModal] = useState(false); const [activeFeedback, setActiveFeedback] = useState(null); - console.log(closeModal); return ( -
setCloseModal(true)} > @@ -32,7 +30,7 @@ const Feedback = ({ feedbacks }) => {
{feedbacks.map((item, index) => (
setActiveFeedback(item)} > @@ -41,28 +39,36 @@ const Feedback = ({ feedbacks }) => { alt="" className="transition duration-300 transform hover:-translate-y-1 w-14 h-14" /> - {activeFeedback === item && ( - <> -

{item.name}

- - - )} +

+ {item.name} +

+
))}
-
+ + ); };