This file contains hidden or 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
| import RNAndroidLocationEnabler from 'react-native-android-location-enabler'; | |
| import {Platform, PermissionsAndroid} from 'react-native'; | |
| import Geolocation from 'react-native-geolocation-service'; | |
| export const checkLocationPermission = async (): Promise<string> => { | |
| if (Platform.OS === 'android') { | |
| const permission = await PermissionsAndroid.request( | |
| PermissionsAndroid.PERMISSIONS.ACCESS_FINE_LOCATION, | |
| ); |
This file contains hidden or 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
| import {useState, useEffect} from 'react'; | |
| import {LocationEnabler} from 'utils'; | |
| const useLocationEnabler = (): Array<boolean> => { | |
| const [state, internalSetState] = useState<any>(false); | |
| useEffect(() => { | |
| LocationEnabler.checkLocationPermission().then(() => { | |
| LocationEnabler.enableLocation(); | |
| internalSetState(true); |
This file contains hidden or 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
| import {useState, useCallback, useMemo} from 'react'; | |
| import ImagePicker, {ImagePickerOptions} from 'react-native-image-picker'; | |
| type ImageResponse = { | |
| uri: any; | |
| }; | |
| type ImagePickerActions = { | |
| showCamera: () => void; | |
| showImageLibrary: () => void; |
This file contains hidden or 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
| import React, {ReactNode} from 'react'; | |
| import {StyleSheet, Text} from 'react-native'; | |
| import {mapPropsToStyles} from '../utils/style_helper'; | |
| import themeColors from '../../themes/variables'; | |
| import {RnViewStyleProp} from 'native-base'; | |
| interface Props { | |
| children: ReactNode; | |
| style?: RnViewStyleProp | Array<RnViewStyleProp>; | |
| } |
This file contains hidden or 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
| import React, {ReactNode} from 'react'; | |
| import {StyleSheet} from 'react-native'; | |
| import {Container, RnViewStyleProp} from 'native-base'; | |
| interface Props { | |
| children: ReactNode; | |
| style?: RnViewStyleProp | Array<RnViewStyleProp>; | |
| } | |
| export default ({children, style}: Props) => ( |
This file contains hidden or 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
| // hold chat list | |
| var chatlist = document.getElementsByClassName('_55za'); | |
| for(var x=0; x<chatlist.length; x++) { // loop | |
| // open chatbox by triggering click | |
| chatlist[x].click(); | |
| // get message textarea | |
| var messages = document.getElementsByClassName('_552m'); |