react-native-smart-parking
Getting started
- Install package dependencies:
- Using Yarn
yarn add react-native-maps@0.27.1
yarn add @agaweb/react-native-stripe@0.5.5
yarn add react-native-camera@3.43.3
- Install:
- Using npm:
npm install @eohjsc/react-native-smart-parking --save
- Using Yarn:
yarn add @eohjsc/react-native-smart-parking
Mostly automatic installation
$ react-native link react-native-smart-parking
Usage
import { CommonActions, useNavigation } from '@react-navigation/native';
import SmartParking, { initSPConfig } from '@eohjsc/react-native-smart-parking';
export const SmartParkingStack = memo(() => {
const { dispatch } = useNavigation();
const onExitApp = () => {
const resetAction = CommonActions.reset({
index: 0,
routes: [{ name: 'Main' }],
});
dispatch(resetAction);
};
const translations = {en: {}, vi: {}};
const config = {
apiRoot: 'https://backend.eoh.io/api',
googleMapApiKey: '**********',
stripePublishKey: '**********',
pusherAppKey: '**********',
pusherAppCluster: '**********',
maxSeconds: 900,
};
initSPConfig(config);
return (
<SmartParking
auth={auth}
onExitApp={onExitApp}
langTranslate={translations}
/>
);
});