react-touch-carousel icon indicating copy to clipboard operation
react-touch-carousel copied to clipboard

white screen

Open imjord opened this issue 3 years ago • 1 comments

`import React from 'react';
import './Projects.css';
import TouchCarousel from 'react-touch-carousel'
const Projects = () => {

    const myProjects = [
        {
            image: require('../assets/budget.png'),
            title: 'Budget App',
            description: 'A budget app that allows you to track your expenses and income. You can also add new expenses and income to your budget.',
        },
        {
            image: require('../assets/weather.PNG'),
            title: 'Weather App',
            description: 'A weather app that allows you to search for weather conditions in any city. You can also add a new city to your list of cities.',
        },
    
    ]
    function CarouselContainer(){
        // render the carousel structure
        }
        
function renderCard(index, modIndex, cursor){
const item = myProjects[modIndex];
 // render the item 
}

  return (
        
    <TouchCarousel
  component={CarouselContainer}
  cardCount={myProjects.length}
  cardSize={375}
  renderCard={renderCard}
  loop
  autoplay={3000}
></TouchCarousel>
  
  )
}

export default Projects`

what am i missing? my screen just shows blank

imjord avatar Jun 18 '22 04:06 imjord

Your CarouselContainer and renderCard are empty so I can't say any thing. A runnable stackblitz/codesandbox demo would help debug.

xiaody avatar Jun 21 '22 03:06 xiaody