akiran / akiran/react-slick

Slider content donot show up on production

Offen
#1,884 5 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
JavaScript
Sterne
11.9k
Forks
2.1k
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

In local development the Slider is working fine but in production the slider is not showing up

I am using react-slick@0.26.1

### Production
![Screenshot from 2020-08-30 18-05-05](https://user-images.githubusercontent.com/26792137/91658866-a6826900-eaeb-11ea-98ff-f282c769e21a.png)

### Local Development
![Screenshot from 2020-08-30 18-06-52](https://user-images.githubusercontent.com/26792137/91658872-b0a46780-eaeb-11ea-9675-d1bfa0579e02.png)

### Code
```
import React from "react";
import "./ProductList.css";
import Product from "./Product";
import Slider from "react-slick";
import {
ChevronLeft as PrevArrowIcon,
ChevronRight as NextArrowIcon,
} from "@material-ui/icons";

function NextArrow(props) {
const {onClick } = props;
return (

);
}

function PrevArrow(props) {
const {onClick } = props
return (

);
}

const HorizontalSeparator = () => (


);

// configuration for carousel
let settings = {
dots: false,
infinite: true,
speed: 500,
slidesToShow: 5,
initialSlide: 0,
nextArrow: ,
prevArrow: ,
responsive: [
{
breakpoint: 1024,
settings: {
slidesToShow: 5,
slidesToScroll: 5,
infinite: true,
dots: true,
},
},
{
breakpoint: 600,
settings: {
slidesToShow: 3,
slidesToScroll: 3,
initialSlide: 3,
},
},
{
breakpoint: 480,
settings: {
slidesToShow: 1,
slidesToScroll: 1,
},
},
],
};

const ProductList = ({ title, data ,styles}) => {
return (


{title}



{data?.map((item, index) => (


{/* HorizontalSeparator should not follow after last item */}
{index +1 !== data.length && }

))}


);
};

export default ProductList;

```

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.