Skip to content

Commit

Permalink
moving submit logic to form
Browse files Browse the repository at this point in the history
  • Loading branch information
tzits authored Jan 19, 2023
1 parent de4061d commit 107d6c7
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions screens/SubmitBirdsScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,15 @@ import { StyleSheet, Text, View, ScrollView } from "react-native";
import Form from "../components/Form";
import { insertBirdSighting } from "../utils/database";

const SubmitBirdsScreen = ({route, navigation}) => {

const submitBirdHandler = async (bird) => {
await insertBirdSighting(bird)
navigation.navigate('Bird List')
}
const SubmitBirdsScreen = () => {

return(
<ScrollView style={styles.scroll}>
<View style={styles.container}>
<View style={styles.headerView}>
<Text style={styles.header}>Submit a Bird</Text>
</View>
<Form onSubmitBirdHandler={submitBirdHandler} />
<Form />
</View>
</ScrollView>
)
Expand Down

0 comments on commit 107d6c7

Please sign in to comment.