-
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.
feat(#19): integrate Mapbox for real-time location tracking in Map sc…
…reen - Refactoring to use expo router - added no found route with links to map and signup
- Loading branch information
1 parent
f135e84
commit 0ea96bc
Showing
53 changed files
with
166 additions
and
114 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { Link, Stack } from "expo-router"; | ||
import { StyleSheet, Text, View } from "react-native"; | ||
|
||
export default function NotFoundScreen() { | ||
return ( | ||
<> | ||
<Stack.Screen options={{ title: "Oops!" }} /> | ||
<View style={styles.container}> | ||
<Text>This screen doesn't exist.</Text> | ||
<Link href="/map" style={styles.link}> | ||
<Text>Go to Map!</Text> | ||
</Link> | ||
|
||
<Link href="/signup" style={styles.link}> | ||
<Text>Go to SignUp!</Text> | ||
</Link> | ||
</View> | ||
</> | ||
); | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
flex: 1, | ||
alignItems: "center", | ||
justifyContent: "center", | ||
padding: 20, | ||
backgroundColor: "white", | ||
}, | ||
link: { | ||
marginTop: 15, | ||
paddingVertical: 15, | ||
}, | ||
}); |
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
Empty file.
10 changes: 0 additions & 10 deletions
10
apps/driver-app/app/components/__tests__/ThemedText-test.tsx
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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,35 @@ | ||
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"; | ||
|
||
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> | ||
); | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
flex: 1, | ||
}, | ||
}); |
2 changes: 1 addition & 1 deletion
2
apps/driver-app/app/api/index.ts → apps/driver-app/src/api/index.ts
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
File renamed without changes.
10 changes: 10 additions & 0 deletions
10
apps/driver-app/src/components/__tests__/ThemedText-test.tsx
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,10 @@ | ||
// import * as React from 'react'; | ||
|
||
|
||
// import { ThemedText } from '../defaults/ThemedText'; | ||
|
||
it(`renders correctly`, () => { | ||
// const tree = renderer.create(<ThemedText>Snapshot test!</ThemedText>).toJSON(); | ||
|
||
// expect(tree).toMatchSnapshot(); | ||
}); |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
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
2 changes: 1 addition & 1 deletion
2
...pp/app/components/defaults/ThemedText.tsx → ...pp/src/components/defaults/ThemedText.tsx
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
2 changes: 1 addition & 1 deletion
2
...pp/app/components/defaults/ThemedView.tsx → ...pp/src/components/defaults/ThemedView.tsx
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions
6
...app/components/input-text-field/index.tsx → ...src/components/input-text-field/index.tsx
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
2 changes: 1 addition & 1 deletion
2
.../app/components/input-text-field/props.ts → .../src/components/input-text-field/props.ts
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
.../components/obscured-input-text/index.tsx → .../components/obscured-input-text/index.tsx
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions
8
...app/app/components/sign-up-form/index.tsx → ...app/src/components/sign-up-form/index.tsx
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
...-app/app/hooks/api/use-register-driver.ts → ...-app/src/hooks/api/use-register-driver.ts
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { LOCATION_TASK_NAME } from "@/src/tasks/location-task"; | ||
import { useEffect } from "react"; | ||
import useLocationManager from "./use-location-manager"; | ||
|
||
const useBackgroundLocation = () => { | ||
const { startLocationUpdates } = useLocationManager(true); | ||
|
||
useEffect(() => { | ||
startLocationUpdates(LOCATION_TASK_NAME); | ||
}, [startLocationUpdates]); | ||
|
||
return null; | ||
}; | ||
|
||
export default useBackgroundLocation; |
4 changes: 2 additions & 2 deletions
4
...-app/app/hooks/use-foreground-location.ts → ...-app/src/hooks/use-foreground-location.ts
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
Oops, something went wrong.