import React, { Component } from "react"; import { Link } from "react-router-dom"; import Carousel from "react-elastic-carousel"; import Simple from "./Simple/index"; import Header from "./Header/index"; import Blog from "./Blog/index"; import dropdown from "../../../assets/icons/dropdown.png"; import "./index.scss"; const maxDesktopSize = 1250; const fontSize = { desktop: { h1: window.innerWidth > maxDesktopSize ? 20 : window.innerWidth / 70, span: window.innerWidth > maxDesktopSize ? 18 : window.innerWidth / 75, }, }; const SimpleHeader = (props) => { return ( <> {window.innerWidth > 1000 ? (

{props.title}

{props.more ? ( بیشتر فلش ) : null}
) : null} {window.innerWidth < 1000 ? (

{props.title}

بیشتر فلش
) : null} ); }; const TabHeader = (props) => { return ( <> {window.innerWidth > 1000 ? (

{props.title}

بیشتر فلش
) : null} {window.innerWidth < 1000 ? (

{props.title}

بیشتر فلش
) : null} ); }; export default class HomeSlider extends Component { render() { const { data, title, height, designType, number, link } = this.props; let header; if (title) { if (designType === "simple" || designType === "blog") { header = ( number} /> ); } else if (designType === "tab") { header = ; } } return ( <> {window.innerWidth > 1000 ? (
{header} {data.map((item, i) => ( ))}
) : null} {window.innerWidth < 1000 ? (
{header} {data.map((item, i) => ( ))}
) : null} ); } } const Item = (props) => { return ( <> {props.designType === "header" ? (
) : null} {props.designType === "simple" || props.designType === "tab" ? ( ) : null} {props.designType === "blog" ? ( ) : null} // ); };