-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* task(#44): Clean up - adding navigation from the login to the sign up - adding navigation from the sign up to the login * task(#44): Clean up - removing errors from screen and moving to alerts - adding validators in utils - removing navigation header from map - adding default value to phone input - navigation from sucess sign up to map * task(#44): Clean up - moving ride request logic from the map to it's own component - removing redundant comments - adding mqtt status to redux so later we can show if we are connected or not - checking permissions preemtly * task(#44): Clean up - move mapview to it's own component * task(#44): Clean up - make login and signup shared code into a reusable scrollable form container - fixes to bugs in map routes * task(#44): Clean up - moving checkbox props to another file - formatting * task(#44): Clean up - creating generic card - using generic card in all ride request cards - moving props and styles to independent files * task(#44): Clean up - moving config to .env - moving models to api models - remove api index as we no longer using separate api from redux - touchable opacity must be from react-native * task(#44): Clean up - removing api file
- Loading branch information
1 parent
975457f
commit ba337d2
Showing
67 changed files
with
1,069 additions
and
936 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
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
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
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 +1,6 @@ | ||
EXPO_PUBLIC_MORRO_API_BASE_URL=http://192.168.68.106:3000 | ||
EXPO_PUBLIC_MAPBOX_ACCESS_TOKEN=sk.eyJ1IjoiY2dvbWV6bWVuZGV6IiwiYSI6ImNtMndhbDAwZjAzMXQyanNkMHF2NjR3bmUifQ.f6E28fydW9bkhLBP7L_lCQ | ||
EXPO_PUBLIC_MQTT_BROKER_URL=192.168.68.106 | ||
EXPO_PUBLIC_MQTT_PORT=8883 | ||
EXPO_PUBLIC_MQTT_TOPIC_RIDE_REQUESTS_BASE=/drivers/:driver_id/ride-request | ||
EXPO_PUBLIC_MQTT_TOPIC_DRIVER_LOCATION_BASE=/drivers/:driver_id/location |
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
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
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,34 +1,10 @@ | ||
import KeyboardDismiss from "@/src/components/keyboard-dismiss"; | ||
import LoginForm from "@/src/components/login-form"; | ||
import { KeyboardAvoidingView, Platform, StyleSheet, View } from "react-native"; | ||
import { ScrollView } from "react-native-gesture-handler"; | ||
import { SafeAreaView } from "react-native-safe-area-context"; | ||
import LoginForm from '@/src/components/login-form'; | ||
import ScrollableFormContainer from '@/src/components/scrollable-form-container'; | ||
|
||
export default function Login() { | ||
return ( | ||
<SafeAreaView style={{ flex: 1 }}> | ||
<KeyboardAvoidingView | ||
behavior={Platform.OS === "ios" ? "padding" : "height"} | ||
style={{ flex: 1 }} | ||
> | ||
<ScrollView | ||
contentContainerStyle={{ | ||
flexGrow: 1, | ||
}} | ||
> | ||
<KeyboardDismiss> | ||
<View style={styles.container}> | ||
<LoginForm /> | ||
</View> | ||
</KeyboardDismiss> | ||
</ScrollView> | ||
</KeyboardAvoidingView> | ||
</SafeAreaView> | ||
<ScrollableFormContainer> | ||
<LoginForm /> | ||
</ScrollableFormContainer> | ||
); | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
flex: 1, | ||
}, | ||
}); | ||
} |
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,24 @@ | ||
import MapView from '@/src/components/map-view'; | ||
import RideRequestDashboard from '@/src/components/ride-request-dashboard'; | ||
import useForegroundLocation from '@/src/hooks/use-foreground-location'; | ||
import useNotificationPermissions from '@/src/hooks/use-notifications-permissions'; | ||
import { useEffect } from 'react'; | ||
import { View } from 'react-native'; | ||
|
||
export default function Map() { | ||
// useBackgroundLocation(); // TODO: Implement useBackgroundLocation hook | ||
useForegroundLocation(); | ||
|
||
const notification = useNotificationPermissions(); | ||
|
||
useEffect(() => { | ||
notification.requestPermissions(); | ||
}, []); | ||
|
||
return ( | ||
<View style={{ flex: 1 }}> | ||
<MapView /> | ||
<RideRequestDashboard /> | ||
</View> | ||
); | ||
} |
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,35 +1,10 @@ | ||
import KeyboardDismiss from "@/src/components/keyboard-dismiss"; | ||
import SignUpForm from "@/src/components/sign-up-form"; | ||
import React from "react"; | ||
import { KeyboardAvoidingView, Platform, StyleSheet, View } from "react-native"; | ||
import { ScrollView } from "react-native-gesture-handler"; | ||
import { SafeAreaView } from "react-native-safe-area-context"; | ||
import ScrollableFormContainer from '@/src/components/scrollable-form-container'; | ||
import SignUpForm from '@/src/components/sign-up-form'; | ||
|
||
export default function SignUp() { | ||
return ( | ||
<SafeAreaView style={{ flex: 1 }}> | ||
<KeyboardAvoidingView | ||
behavior={Platform.OS === "ios" ? "padding" : "height"} | ||
style={{ flex: 1 }} | ||
> | ||
<ScrollView | ||
contentContainerStyle={{ | ||
flexGrow: 1, | ||
}} | ||
> | ||
<KeyboardDismiss> | ||
<View style={styles.container}> | ||
<SignUpForm /> | ||
</View> | ||
</KeyboardDismiss> | ||
</ScrollView> | ||
</KeyboardAvoidingView> | ||
</SafeAreaView> | ||
<ScrollableFormContainer> | ||
<SignUpForm /> | ||
</ScrollableFormContainer> | ||
); | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
flex: 1, | ||
}, | ||
}); | ||
} |
Oops, something went wrong.