Comments Section Fixed

temp
Pedram Keshavarzi 3 years ago
parent 5e3de37ccd
commit 77021f359a
  1. 2
      src/components/Comments/index.js
  2. 16
      src/components/QandA/index.js
  3. 4
      src/views/Home/Desktop/Part2/index.js
  4. 2
      src/views/Home/Desktop/index.js

@ -68,7 +68,7 @@ export const Comments = ({ comments }) => {
)} )}
</div> </div>
</header> </header>
<p className="text-gray-500 mt-2">{comment.text}</p> <p className="text-gray-500 h-auto leading-7 mt-2">{comment.text}</p>
<div className="self-end mt-4"> <div className="self-end mt-4">
{/* <Button title='اطلاعات بیشتر' backgroundColor='bg-gray-200' width={}/> */} {/* <Button title='اطلاعات بیشتر' backgroundColor='bg-gray-200' width={}/> */}
</div> </div>

@ -9,18 +9,18 @@ import Button from "../Button";
const QandA = ({ comments }) => { const QandA = ({ comments }) => {
const Comment = ({ comment }) => { const Comment = ({ comment }) => {
const [open, Setopen] = useState(true); const [open, Setopen] = useState(true);
const [viewmore, setViewMore] = useState("مشاهده باسخ های بیشتر"); const [viewmore, setViewMore] = useState("مشاهده پاسخ های بیشتر");
const [numberOfAnswers, setNumberOfAnswers] = useState(1); const [numberOfAnswers, setNumberOfAnswers] = useState(1);
const [isOpen, setIsOpen] = useState(false); const [isOpen, setIsOpen] = useState(false);
return ( return (
<> <>
<div className="flex flex-col w-full py-6 border-t-2 border-solid border-gray-200"> <div className="flex flex-col leading-7 w-full py-6 border-t-2 border-solid border-gray-200">
<header className="w-full flex flex-row justify-between py-1"> <header className="w-full flex flex-row justify-between py-1">
<div className="flex flex-row items-end"> <div className="flex flex-row items-end">
<div className="flex items-center"> <div className="flex items-center">
<strong className="text-lg mx-2">{comment.username}</strong> <strong className="text-lg mx-2">{comment.username}</strong>
{comment.isCostumer ? ( {comment.isCostumer ? (
<p className="text-blueC0">خریدار محصول</p> <p className="text-greenBA font-light">خریدار محصول</p>
) : null} ) : null}
</div> </div>
</div> </div>
@ -43,7 +43,7 @@ const QandA = ({ comments }) => {
<header className="w-full flex flex-row justify-between items-center"> <header className="w-full flex flex-row justify-between items-center">
<div className="flex flex-row items-center"> <div className="flex flex-row items-center">
<div className="py-4 px-6 bg-blue-100 text-gray-400 rounded"> <div className="py-4 px-6 bg-blue-100 text-gray-400 rounded">
<h1>برسش</h1> <h1>پرسش</h1>
</div> </div>
</div> </div>
</header> </header>
@ -63,7 +63,7 @@ const QandA = ({ comments }) => {
<header className="w-full flex flex-row justify-between items-center"> <header className="w-full flex flex-row justify-between items-center">
<div className="flex flex-row items-center"> <div className="flex flex-row items-center">
<div className="py-4 px-6 bg-green-100 text-gray-400 rounded"> <div className="py-4 px-6 bg-green-100 text-gray-400 rounded">
<h1>باسخ</h1> <h1>پاسخ</h1>
</div> </div>
</div> </div>
</header> </header>
@ -81,7 +81,7 @@ const QandA = ({ comments }) => {
<header className="w-full flex flex-row justify-between items-center"> <header className="w-full flex flex-row justify-between items-center">
<div className="flex w-4/5 flex-row items-center"> <div className="flex w-4/5 flex-row items-center">
<div className="py-4 px-6 bg-green-100 text-gray-400 mx-16 rounded"> <div className="py-4 px-6 bg-green-100 text-gray-400 mx-16 rounded">
<h1>ارسال باسخ</h1> <h1>ارسال پاسخ</h1>
</div> </div>
</div> </div>
</header> </header>
@ -102,12 +102,12 @@ const QandA = ({ comments }) => {
isOpen isOpen
? () => { ? () => {
setNumberOfAnswers(1); setNumberOfAnswers(1);
setViewMore("مشاهده باسخ های بیشتر"); setViewMore("مشاهده پاسخ های بیشتر");
setIsOpen(false); setIsOpen(false);
} }
: () => { : () => {
setNumberOfAnswers(comment.answers.length); setNumberOfAnswers(comment.answers.length);
setViewMore("بستن باسخ ها"); setViewMore("بستن پاسخ ها");
setIsOpen(true); setIsOpen(true);
} }
} }

@ -23,7 +23,7 @@ const Part2 = (
}, []); }, []);
return ( return (
<div className="w-full my-6" style={{ <div className="w-full my-6" style={{
height: '500px' height: '550px'
}}> }}>
<div className="w-full flex justify-between items-center"> <div className="w-full flex justify-between items-center">
<div className="flex items-center text-4xl font-black text-blue52"> <div className="flex items-center text-4xl font-black text-blue52">
@ -39,7 +39,7 @@ const Part2 = (
backgroundColor="bg-blue-100" backgroundColor="bg-blue-100"
border={{ border={{
color: "#196EC055", color: "#196EC055",
width: "0px", width: "0px",
}} }}
width="100%" width="100%"
selectable={true} selectable={true}

@ -8,7 +8,7 @@ import SalesContainer from "../../../components/SalesContainer";
import { book, publicApi } from "../../../redux/actions"; import { book, publicApi } from "../../../redux/actions";
import Part2 from "./Part2"; import Part2 from "./Part2";
import HomeImg from '../../../assets/images/HomeImg.svg'; import HomeImg from '../../../assets/images/HomeImg.png';
import Part4 from "./Part4"; import Part4 from "./Part4";
import Design2D from "../../../components/Design2D"; import Design2D from "../../../components/Design2D";

Loading…
Cancel
Save