From d542c25603b870b81199ac67f26e326089e4a8fa Mon Sep 17 00:00:00 2001
From: amir hosein gorji
{blog.text}
++
+ ) : ( @@ -134,6 +137,7 @@ const Identifier = (props) => { ) : null} {data.type === "image" ? ( diff --git a/src/views/Blog/index.scss b/src/views/Blog/index.scss index 0ce788f..bc8bd2d 100644 --- a/src/views/Blog/index.scss +++ b/src/views/Blog/index.scss @@ -1,5 +1,6 @@ .portrait-blog { - width: 100vw; + max-width: 95vw !important; + // height: 100vh; padding: 0px 10px; position: relative; @@ -45,6 +46,7 @@ &--image { width: 100%; & img { + max-width: 80vw !important; width: 100%; height: 100%; border-radius: 10px; @@ -60,6 +62,12 @@ font-size: 14px; letter-spacing: -1px; font-family: numeralLight; + & img { + max-width: 80vw !important; + height: 100%; + border-radius: 10px; + margin: 0 auto; + } } } } @@ -113,8 +121,9 @@ &__body { width: 100%; &--image { + margin: auto; width: 100%; - max-height: 300px; + // max-height: 300px; } &--text { margin-top: 40px; diff --git a/src/views/Blogs/BreadCrumb/index.js b/src/views/Blogs/BreadCrumb/index.js index c23689f..0757e44 100644 --- a/src/views/Blogs/BreadCrumb/index.js +++ b/src/views/Blogs/BreadCrumb/index.js @@ -4,13 +4,7 @@ import { Link } from "react-router-dom"; import "./index.scss"; -function handleClick(event) { - event.preventDefault(); - console.info("You clicked a breadcrumb."); -} - const maxDesktopSize = 1250; -const maxMobileSize = 650; const fontSize = { desktop: window.innerWidth > maxDesktopSize ? 12 : window.innerWidth / 90, diff --git a/src/views/Cart/DeliveryMethod/index.js b/src/views/Cart/DeliveryMethod/index.js index 68619f0..4d2ce65 100644 --- a/src/views/Cart/DeliveryMethod/index.js +++ b/src/views/Cart/DeliveryMethod/index.js @@ -27,8 +27,7 @@ const fontSize = { }; class DeliveryMethod extends Component { render() { - const { data, setTransport, factorInfo, parent, transportId, list } = - this.props; + const { data, setTransport, factorInfo, transportId } = this.props; return ( <> {window.innerWidth > 1000 ? ( diff --git a/src/views/Cart/Factor/index.js b/src/views/Cart/Factor/index.js index d95a6f8..0c94ecb 100644 --- a/src/views/Cart/Factor/index.js +++ b/src/views/Cart/Factor/index.js @@ -1,4 +1,4 @@ -import React, { Component } from "react"; +import React from "react"; import { connect } from "react-redux"; import "./index.scss"; @@ -26,14 +26,6 @@ const fontSize = { }; const Factor = (props) => { - const { list, parent } = props; - const totalPrice = () => { - let total = 0; - for (let i = 0; i < list.length; i++) { - total += list[i].product.price * list[i].count; - } - return total; - }; const { factorInfo } = props; return ( <> diff --git a/src/views/Cart/Table/index.js b/src/views/Cart/Table/index.js index 926965f..af7cf20 100644 --- a/src/views/Cart/Table/index.js +++ b/src/views/Cart/Table/index.js @@ -75,7 +75,7 @@ const fontSize = { function BasicTable(props) { const classes = useStyles(); - const { list, handleCounter, handleDelete, route, factorInfo } = props; + const { list, handleDelete, route, factorInfo } = props; const sum = () => { let total = 0; for (let i = 0; i < list.length; i++) { @@ -181,7 +181,7 @@ function BasicTable(props) { } const Item = (props) => { - const { data, pushToCart, id, route, factorInfo } = props; + const { data, pushToCart, id, route } = props; return ( <> {window.innerWidth < 1000 ? ( diff --git a/src/views/Cart/index.js b/src/views/Cart/index.js index 70c018a..a053c9e 100644 --- a/src/views/Cart/index.js +++ b/src/views/Cart/index.js @@ -11,8 +11,6 @@ import Factor from "./Factor/index"; import Loader from "~/components/Loader/index"; import { Link } from "react-router-dom"; -import sciense_6 from "../../assets/images/sciense-6.png"; - import "./index.scss"; const maxDesktopSize = 1250; @@ -65,7 +63,7 @@ class Cart extends Component { // if (this.props.list.length > 0) { // let wantedId; //should be zero // for (let item of this.props.list) { - // if (item.condition == 2) { + // if (item.condition === 2) { // wantedId = item.id; // break; // } @@ -116,9 +114,8 @@ class Cart extends Component { }; render() { - const { list, payPrice, payMethods, factorInfo, userId, hasPhysical } = - this.props; - if (!factorInfo || list.length == 0) + const { list, payPrice, payMethods, factorInfo, userId } = this.props; + if (!factorInfo || list.length === 0) return (