File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,12 +27,11 @@ export default function FindRouteScreen({ navigation }) {
2727 const isFormValid = start . trim ( ) !== '' && destination . trim ( ) !== '' ;
2828
2929 const fetchRoutes = async ( ) => {
30-
31- username = await retrieveData ( 'username' )
32- if ( username == null ) {
33- username = "" ;
30+ username = await retrieveData ( 'username' ) ;
31+ if ( username == null ) {
32+ username = '' ;
3433 }
35-
34+
3635 try {
3736 const payload = {
3837 origin : start ,
@@ -46,15 +45,20 @@ export default function FindRouteScreen({ navigation }) {
4645 Platform . OS === 'web'
4746 ? 'http://localhost:8000'
4847 : process . env . EXPO_PUBLIC_API_URL ;
49- console . log ( `Sending request to ${ baseUrl } /wayfinding/preferences/get_routes` ) ;
48+ console . log (
49+ `Sending request to ${ baseUrl } /wayfinding/preferences/get_routes` ,
50+ ) ;
5051
51- const response = await fetch ( `${ baseUrl } /wayfinding/preferences/get_routes` , {
52- method : 'POST' ,
53- headers : {
54- 'Content-Type' : 'application/json' ,
52+ const response = await fetch (
53+ `${ baseUrl } /wayfinding/preferences/get_routes` ,
54+ {
55+ method : 'POST' ,
56+ headers : {
57+ 'Content-Type' : 'application/json' ,
58+ } ,
59+ body : JSON . stringify ( payload ) ,
5560 } ,
56- body : JSON . stringify ( payload ) ,
57- } ) ;
61+ ) ;
5862
5963 if ( ! response . ok ) {
6064 throw new Error ( `HTTP error! status: ${ response . status } ` ) ;
Original file line number Diff line number Diff line change @@ -46,15 +46,18 @@ export default function LoginScreen({ navigation }) {
4646 < Text style = { styles . TouchableOpacityText } > Log In</ Text >
4747 </ TouchableOpacity >
4848 </ >
49- ) : ( < >
50- < Text style = { styles . Text } > You are logged in</ Text >
51- < TouchableOpacity
52- style = { styles . TouchableOpacity }
53- onPress = { ( ) => navigation . navigate ( 'Map' ) }
54- color = "#841584" >
55- < Text style = { styles . TouchableOpacityText } > Go to Map</ Text >
56- </ TouchableOpacity >
57- </ > ) }
49+ ) : (
50+ < >
51+ < Text style = { styles . Text } > You are logged in</ Text >
52+ < TouchableOpacity
53+ style = { styles . TouchableOpacity }
54+ onPress = { ( ) => navigation . navigate ( 'Map' ) }
55+ color = "#841584"
56+ >
57+ < Text style = { styles . TouchableOpacityText } > Go to Map</ Text >
58+ </ TouchableOpacity >
59+ </ >
60+ ) }
5861 </ SafeAreaView >
5962 </ View >
6063 ) ;
Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ export default function MapScreen({ navigation }) {
101101 icon = { locationCircleIcon }
102102 />
103103 </ MapView >
104-
104+
105105 < TouchableOpacity style = { MapStyles . sendButton } onPress = { sendLocation } >
106106 < Text style = { MapStyles . buttonText } > Send Location</ Text >
107107 </ TouchableOpacity >
@@ -149,7 +149,7 @@ export default function MapScreen({ navigation }) {
149149 onPress = { ( ) => navigation . navigate ( 'PreferencesScreen' ) }
150150 >
151151 < Text style = { MapStyles . buttonText } > User Preferences</ Text >
152- </ TouchableOpacity >
152+ </ TouchableOpacity >
153153 </ >
154154 ) ;
155155 }
You can’t perform that action at this time.
0 commit comments