Created
February 1, 2021 21:56
-
-
Save AllanGraves/1702d3633d782e556086b0863d577ad7 to your computer and use it in GitHub Desktop.
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
const LocationScreen = ({route, navigation}) => { | |
let variables = route.params.story.variables; | |
useEffect(() => { | |
/* Override variables passed in with anything loaded from AsyncStorage */ | |
variables = getData(route.params.storyID, variables); | |
}, []); | |
console.log('LocationScreen: ' + JSON.stringify(variables)); | |
return ( | |
<ScrollView> | |
<View style={styles.centeredView}> | |
<Location | |
jsondata={route.params.story.locations} | |
locationID={route.params.locationID} | |
key={route.params.storyID} | |
variables={variables} | |
navigation={navigation} | |
storyID={route.params.storyID} /* TODO - make this a global context */ | |
/> | |
</View> | |
</ScrollView> | |
); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment