import React, { Component } from "react";
import {
  View,
  Animated,
  Text,
} from "react-native";

import styles from "../assets/styles";
import demoData from "../assets/data/demo";

import Card from "../components/Card";
import CardStack from "../components/CardStack";
import SuggestionCard from "../components/SuggestionCard";

class Home extends Component {
  render() {
    return (
      <View>
        <CardStack
          ref={swiper => (this.swiper = swiper)}
          verticalSwipe={false}
        >
          {demoData.map((item, index) => (
            <Card key={index}>
              <SuggestionCard
                name={item.name}
              />
            </Card>
          ))}
        </CardStack>
      </View>
    );
  }
}

export default Home;