-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
43 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,25 @@ | ||
import { StatusBar } from 'expo-status-bar'; | ||
import { useState } from 'react'; | ||
import { StyleSheet, View } from 'react-native'; | ||
import Header from './src/components/Header'; | ||
import Search from './src/components/Search'; | ||
import CategoryItems from './src/data/db'; | ||
import Categories from './src/components/Categories'; | ||
import Restaurants from './src/components/Restaurants'; | ||
|
||
import { useState } from 'react'; | ||
// import { createAppContainer } from "react-navigation"; | ||
// import { createStackNavigator } from "react-navigation-stack"; | ||
import HomeScreen from "./src/screens/HomeScreen"; | ||
|
||
export default function App() { | ||
const [term, setTerm] = useState("Burger"); | ||
|
||
return ( | ||
<View> | ||
<Header/> | ||
<Search setTerm={setTerm}/> | ||
<Categories | ||
categories = {CategoryItems} | ||
setTerm = { setTerm } | ||
term = {term} | ||
/> | ||
<Restaurants term={term}/> | ||
<StatusBar style="auto" /> | ||
</View> | ||
<HomeScreen/> | ||
); | ||
} | ||
|
||
|
||
// const navigator = createStackNavigator({ | ||
// Home: HomeScreen | ||
// },{ | ||
// initialRouteName: "Home", | ||
// defaultNavigationOptions: { | ||
// title: "BusinessSearch" | ||
// } | ||
// }); | ||
|
||
// export default createAppContainer(navigator); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { StatusBar } from "expo-status-bar"; | ||
import { useState } from "react"; | ||
import { View } from "react-native"; | ||
import Categories from "../components/Categories"; | ||
import Header from "../components/Header"; | ||
import Restaurants from "../components/Restaurants"; | ||
import Search from "../components/Search"; | ||
import CategoryItems from "../data/db"; | ||
|
||
export default function HomeScreen(){ | ||
const [term, setTerm] = useState("Burger"); | ||
return( | ||
<View> | ||
<Header/> | ||
<Search setTerm={setTerm}/> | ||
<Categories | ||
categories = {CategoryItems} | ||
setTerm = { setTerm } | ||
term = {term} | ||
/> | ||
<Restaurants term={term}/> | ||
<StatusBar style="auto" /> | ||
</View> | ||
); | ||
} |