-
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): view current location as a driver i want to see my current…
… location on a map in real time so that i can track my position and navigate the area effectively - modifying map screen ui - using auth token as channel name when publishing location - changes in store - test screen (token display)
- Loading branch information
1 parent
fbe992e
commit 691aafa
Showing
29 changed files
with
3,536 additions
and
243 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,27 @@ | ||
// https://docs.expo.dev/guides/using-eslint/ | ||
module.exports = { | ||
extends: 'expo', | ||
extends: [ | ||
'expo', | ||
'eslint:recommended', | ||
'plugin:prettier/recommended' | ||
], | ||
plugins: ['prettier'], | ||
rules: { | ||
'prettier/prettier': [ | ||
'error', | ||
{ | ||
trailingComma: 'none', | ||
tabWidth: 2, | ||
useTabs: false, | ||
semi: true, | ||
singleQuote: true, | ||
endOfLine: 'lf', | ||
printWidth: 80, | ||
proseWrap: 'never' | ||
} | ||
], | ||
'no-trailing-spaces': [ | ||
'error', | ||
{ skipBlankLines: false, ignoreComments: false } | ||
] | ||
} | ||
}; |
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
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,59 @@ | ||
import { RootState } from '@/src/store'; | ||
import AsyncStorage from '@react-native-async-storage/async-storage'; | ||
import React, { useEffect } from 'react'; | ||
import { StyleSheet, Text, View } from 'react-native'; | ||
import { useSelector } from 'react-redux'; | ||
|
||
|
||
const TokenDisplayScreen: React.FC = () => { | ||
const accessToken = useSelector((state: RootState) => state.auth.accessToken); | ||
const refreshToken = useSelector((state: RootState) => state.auth.refreshToken); | ||
|
||
useEffect(() => { | ||
AsyncStorage.setItem('test', 'testValue') | ||
.then(() => AsyncStorage.getItem("persist:root")) | ||
.then((value) => console.log('Persisted state:', value)) | ||
.catch((error) => console.error('AsyncStorage error:', error)); | ||
}, []); | ||
|
||
return ( | ||
<View style={styles.container}> | ||
<Text style={styles.title}>Token Information</Text> | ||
<Text style={styles.label}>Access Token:</Text> | ||
<Text style={styles.token}> | ||
{accessToken || 'No access token available'} | ||
</Text> | ||
<Text style={styles.label}>Refresh Token:</Text> | ||
<Text style={styles.token}> | ||
{refreshToken || 'No refresh token available'} | ||
</Text> | ||
</View> | ||
); | ||
}; | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
flex: 1, | ||
padding: 20, | ||
backgroundColor: '#ffffff', | ||
justifyContent: 'center', | ||
}, | ||
title: { | ||
fontSize: 24, | ||
fontWeight: 'bold', | ||
marginBottom: 20, | ||
textAlign: 'center', | ||
}, | ||
label: { | ||
fontSize: 18, | ||
fontWeight: 'bold', | ||
marginTop: 10, | ||
}, | ||
token: { | ||
fontSize: 16, | ||
color: '#333', | ||
marginTop: 5, | ||
}, | ||
}); | ||
|
||
export default TokenDisplayScreen; |
Oops, something went wrong.