From b7b5c2569b739ca963365a41f7124e792fb24f89 Mon Sep 17 00:00:00 2001 From: Ujjal Acharya Date: Mon, 18 May 2020 15:10:30 +0545 Subject: [PATCH] add dummy searched bus screen --- app/src/components/SearchedSingleBus.js | 56 +++++++++++++++++++++++++ app/src/screens/AfterGo/SearchScreen.js | 14 ++++++- 2 files changed, 68 insertions(+), 2 deletions(-) create mode 100644 app/src/components/SearchedSingleBus.js diff --git a/app/src/components/SearchedSingleBus.js b/app/src/components/SearchedSingleBus.js new file mode 100644 index 0000000..92aae3e --- /dev/null +++ b/app/src/components/SearchedSingleBus.js @@ -0,0 +1,56 @@ +import * as React from "react"; +import { Avatar, Button, Card, Title, Paragraph } from "react-native-paper"; +import { View, Image, StyleSheet, Alert, Text } from "react-native"; +import { TouchableNativeFeedback } from "react-native-gesture-handler"; +import ConstantColors from "../constants/ConstantColors"; + +const SearchedSingleBus = ({ bus }) => ( + Alert.alert("Sup")} + > + + + + + + {bus.title} + {bus.price} + + + {bus.seats} seats + + + Time: {bus.time} + + + + + + + + + + + + + + +); + +const styles = StyleSheet.create({ + rowFlex: { + display: "flex", + flexDirection: "row", + }, + tinyLogo: { + width: "100%", + height: 120, + borderTopLeftRadius: 4, + borderTopRightRadius: 4, + }, +}); + +export default SearchedSingleBus; diff --git a/app/src/screens/AfterGo/SearchScreen.js b/app/src/screens/AfterGo/SearchScreen.js index 6df633c..df3440a 100644 --- a/app/src/screens/AfterGo/SearchScreen.js +++ b/app/src/screens/AfterGo/SearchScreen.js @@ -3,6 +3,9 @@ import { Text, View } from "react-native"; import { Appbar } from "react-native-paper"; import { connect } from "react-redux"; +import SearchedSingleBus from "../../components/SearchedSingleBus"; +import { ScrollView } from "react-native-gesture-handler"; +import { busData } from "../../utils/mock"; export class SearchScreen extends Component { state = { @@ -16,7 +19,6 @@ export class SearchScreen extends Component { }; render() { - console.log(this.props) return ( @@ -24,7 +26,15 @@ export class SearchScreen extends Component { {/* */} - Search Screen + + {busData.map((bus, i) => ( + + ))} + ); }