Skip to content

Instantly share code, notes, and snippets.

@tanner-west
Created April 27, 2022 15:23
Show Gist options
  • Save tanner-west/d9ca061683b5103cd835b60c64378708 to your computer and use it in GitHub Desktop.
Save tanner-west/d9ca061683b5103cd835b60c64378708 to your computer and use it in GitHub Desktop.
return (
<SafeAreaView>
<ScrollView style={{padding: 10}}>
{!quizIsDone ? (
<>
<View>
{questions && questions.length > 0 ? (
<Question
question={questions[currentQuestion]}
onSubmit={onSubmit}
/>
) : null}
</View>
<View>
<Button
style={{marginVertical: 5}}
onPress={onNextQuestion}
disabled={!isSubmitted}>
Next
</Button>
</View>
</>
) : (
<View>
<Results results={results.current} />
<Button onPress={() => navigation.navigate('Home')}>Go Home</Button>
</View>
)}
</ScrollView>
</SafeAreaView>
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment