reza fixed some bugs on Product page

temp
Reza_ashrafi 3 years ago
parent 0fcd6202d0
commit 8be8dfe377
  1. 13
      src/views/Product/Rate/index.js
  2. 8
      src/views/Product/index.js

@ -1,25 +1,30 @@
import React from "react";
import separate from '../../../utils/separate';
//components
import StarRating from "../../../components/StarRating";
import Progress from "../../../components/Progress";
function Rate({ avarage, all, fields, desktop }) {
return (
<div className="w-full flex flex-row justify-between items-center mt-2">
<div className="w-full flex flex-row justify-between items-center mt-5">
<div className="flex flex-col items-center justify-center h-full ml-4">
{
desktop ?
<h1 className={`text-7xl text-gray-600 mb-2 font-bold dark:text-white`}>
<h1 className={`text-gray-600 mb-2 font-bold dark:text-white`}>
{avarage}
</h1>
:
<strong className={`text-3xl text-blue5F mb-2 font-bold dark:text-white`}>
<strong className={`text-blue5F mb-2 font-bold dark:text-white`} style={{ fontSize: 'calc(100vw / 10)' }}>
{avarage}
</strong>
}
<div className="">
<StarRating />
</div>
<span className="text-xs text-gray70 mt-2 dark:text-white">{all}</span>
<span className="text-base text-gray70 mt-2 dark:text-white">{separate(all)}</span>
</div>
<ul className="p-0 m-0 list-none flex flex-col flex-1">
{fields.map((item, index) => (

@ -54,7 +54,7 @@ export const Product = ({
{/* Portrait */}
{isMobile ? (
<div className="w-full flex flex-col bg-transparent px-4 pb-24">
{!book && (
{(!book) && (
<div className="w-full h-screen flex justify-center items-center bg-white bg-opacity-20 backdrop-filter backdrop-blur-xl fixed left-0 top-0 z-50">
<Loading size={4} color="bg-green-400" />
</div>
@ -115,7 +115,7 @@ export const Product = ({
<ButtonBetween
width="72%"
item={"خرید نسخه دیجیتال کتاب"}
status={separate(book?.product[1]?.price) + " " + "تومان"}
status={separate(book?.product[0]?.price) + " " + "تومان"}
onClick={() =>
userId
? pushToCart({
@ -138,7 +138,7 @@ export const Product = ({
<ButtonBetween
width="72%"
item={"خرید نسخه ویدئویی کتاب"}
status={separate(book?.product[1]?.price) + " " + "تومان"}
status={separate(book?.product[2]?.price) + " " + "تومان"}
onClick={() =>
userId
? pushToCart({
@ -152,7 +152,7 @@ export const Product = ({
<ButtonBetween
width="25%"
item={"پیش نمایش"}
onClick={() => navigation('/videos/' + book?.idK)}
onClick={() => navigation("/videos/" + book?.id)}
/>
</div>
<div className="w-full flex flex-col justify-between items-center mt-8">

Loading…
Cancel
Save