@eohjsc/react-native-smart-parking
v1.4.48
Published
TODO
Downloads
86
Readme
react-native-smart-parking
Getting started
- Install package dependencies:
- Using Yarn
yarn add [email protected]
yarn add @agaweb/[email protected]
yarn add [email protected]
- 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}
/>
);
});