import React, {useEffect} from "react"; import Carousel from "react-elastic-carousel"; import Course from "./Course/index"; import { Link } from "react-router-dom"; import ExpandMoreRoundedIcon from "@mui/icons-material/ExpandMoreRounded"; import {connect} from 'react-redux'; import "./index.scss"; function Courses({number, courses, selectedSort} : any) { const slideNumberHandler = () => { if (window.innerWidth >= 1440) { return 5; } else if (window.innerWidth >= 1008 && window.innerWidth < 1440) { return 4; } else if (window.innerWidth > 640 && window.innerWidth < 1008) { return 3; } else { return 2; } }; return (

{selectedSort}

در این قسمت شاید یک متن جهت زیباسازی قرار بگیرد.
بیشتر
{window.innerWidth > 1007 ? ( {courses?.map((item: Object, i: Number) => ( ))} ) : (
{courses?.map((item: Object, i: Number) => ( ))}
)} مشاهده بیشتر{" "}
); } export default connect((state : any) => ({ selectedSort : state.book.selectedSort, }))(Courses)