iqeats/pages/Home.tsx

36 lines
772 B
TypeScript
Raw Permalink Normal View History

2021-08-11 06:17:58 +00:00
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;