From 309fd435657e841fb0be7867cf0883c3ad6eb764 Mon Sep 17 00:00:00 2001 From: mahdi Date: Wed, 11 May 2022 11:38:55 +0430 Subject: [PATCH] update src/components/Feedback/index.js and data.js --- src/components/Feedback/index.js | 39 +++++++++++++------------------- src/redux/data.js | 11 +++++++++ 2 files changed, 27 insertions(+), 23 deletions(-) diff --git a/src/components/Feedback/index.js b/src/components/Feedback/index.js index 3080485..c61f27f 100644 --- a/src/components/Feedback/index.js +++ b/src/components/Feedback/index.js @@ -1,36 +1,27 @@ import React, { useState } from "react"; -import removeCard from "./card-remove.svg"; - -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 Feedback = ({ feedbakTitle, feedbacks }) => { const [closeModal, setCloseModal] = useState(false); const [activeFeedback, setActiveFeedback] = useState(null); return (
setCloseModal(true)} > - + remove
-

- نظر شما نسبت به رابط کاربری سایت جدیدمون چیه؟ -

+

{feedbakTitle}

{feedbacks.map((item, index) => (
setActiveFeedback(item)} > @@ -47,7 +38,7 @@ const Feedback = ({ feedbacks }) => { {item.name}

{ export default Feedback; Feedback.defaultProps = { + feedbakTitle: "نظر شما نسبت به رابط کاربری سایت جدیدمون چیه؟", + feedbacks: [ { - icon: heartEmoji, + icon: "images/heart-emoji.svg", name: "عالی", }, { - icon: smileEmoji, + icon: "images/smile-emoji.svg", name: "خوب", }, { - icon: speechlessEmoji, + icon: "images/speechless-emoji.svg", name: "اوکیه", }, { - icon: sadEmoji, + icon: "images/sad-emoji.svg", name: "بد", }, { - icon: suspiciousEmoji, + icon: "images/suspicious-emoji.svg", name: "خیلی بد", }, ], diff --git a/src/redux/data.js b/src/redux/data.js index c858bfb..11489c9 100644 --- a/src/redux/data.js +++ b/src/redux/data.js @@ -15,6 +15,7 @@ import CounterDesign from "../components/CounterDesign"; import CourseList from "../components/CourseList"; import ProductFilter from "../components/ProductFilter"; import Features from "../components/Features"; +import Feedback from "../components/Feedback"; // mini components import MiniComponents from "../components/MiniComponents"; @@ -279,6 +280,16 @@ const components = [ code: null, }, }, + { + name: "Feedback", + author: "Andalib", + props: [], + content: { + name: "Feedback", + component: , + code: null, + }, + }, // mini components { name: "Mini Components",