Commit 90c98eac authored by Solveig Hergot Langås's avatar Solveig Hergot Langås
Browse files

#21 cards works perfectly

parent c3d4393c
......@@ -8,7 +8,6 @@ import MaterialDialog from '../DetailedCard'
class Card extends Component {
state ={
data: [],
currentSerachWord: "all",
dataElement: "",
visible: false
}
......@@ -21,27 +20,6 @@ class Card extends Component {
GetData(input, this.props.sort).then((res) => this.setState({data: res.data.data}))
}
/*checkPage(){
console.log("PAGEN: ", this.props.page)
//console.log(this.props.page === "Explore")
if(this.props.page === "Home"){
this.setData(5)}
if(this.props.page === "Explore"){
//console.log("INNE I DEN GRENIA ;))) ", this.props.word)
if(this.props.word === "all"){
if(this.props.continent === 'all'){
//console.log("Henter alt")
this.setData("")
}else{
this.setData(this.props.continent)}
}else if(this.props.continent === 'all'){
//console.log("Henter etter søkeord: ", this.props.word)
this.setData(this.props.word)
}else{this.setData(this.props.continent + "/" + this.props.word)}
} }*/
openDetailedCard(destinationID, popularity){
GetData(destinationID, "").then((res) => this.setState({dataElement: res.data.data}))
this.setState({visible: true})
......@@ -101,7 +79,8 @@ class Card extends Component {
return (
<View>
<FlatList contentContainerStyle={{
width: 350
width: 350,
paddingBottom: 65
}}
data = {data}
renderItem = { ({ item }) => (
......
......@@ -26,6 +26,7 @@ class HomePage extends Component {
<View style={{
paddingTop: 36,
flex: 1,
flexDirection: "column",
alignItems: "center"
}}>
<Text style={{fontSize: 28, textAlign: "center", padding: 8}}>Welcome to Dream Destinations</Text>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment