Skip to content

Commit

Permalink
Merge pull request #1 from mmitrasish/dev
Browse files Browse the repository at this point in the history
Merge Dev to Master
  • Loading branch information
rekpero authored Jun 5, 2020
2 parents 005212d + 8258ecb commit 6ffdb37
Showing 44 changed files with 768 additions and 1,696 deletions.
27 changes: 27 additions & 0 deletions App.js
Original file line number Diff line number Diff line change
@@ -2,6 +2,8 @@ import * as React from "react";
import { View, AsyncStorage } from "react-native";
import Routes from "./routes";
import { AuthContext } from "./hooks";
import { WebService } from "./services";
import { sortNotaries } from "./utils";

function App() {
const [state, dispatch] = React.useReducer(
@@ -25,12 +27,25 @@ function App() {
isSignout: true,
userMobileNumber: null,
};
case "SET_ALL_NOTARIES":
return {
...prevState,
allNotaries: action.allNotaries,
backupNotaries: action.allNotaries,
};
case "SET_ONLY_ALL_NOTARIES":
return {
...prevState,
allNotaries: action.allNotaries,
};
}
},
{
isLoading: true,
isSignout: false,
userMobileNumber: null,
allNotaries: [],
backupNotaries: [],
}
);
React.useEffect(() => {
@@ -54,6 +69,18 @@ function App() {
dispatch({ type: "SIGN_IN", token: data });
},
signOut: () => dispatch({ type: "SIGN_OUT" }),
fetchNotaryItem: async (userMobileNumber) => {
const allNotaries = await WebService.getNotaryItemsByNumber(
userMobileNumber
);
const finalSort = allNotaries.notaries
? sortNotaries(allNotaries.notaries)
: [];
dispatch({ type: "SET_ALL_NOTARIES", allNotaries: finalSort });
},
setAllNotaries: (allNotaries) => {
dispatch({ type: "SET_ONLY_ALL_NOTARIES", allNotaries });
},
}),
[]
);
Binary file modified Screenshots/Screenshot1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Screenshots/Screenshot8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -182,6 +182,7 @@ android {
}

dependencies {
implementation project(':react-native-otp-verify')
implementation project(':react-native-image-picker')
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.facebook.react:react-native:+" // From node_modules
Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@

import com.facebook.react.PackageList;
import com.facebook.react.ReactApplication;
import com.faizal.OtpVerify.RNOtpVerifyPackage;
import com.imagepicker.ImagePickerPackage;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
2 changes: 2 additions & 0 deletions android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
rootProject.name = 'BluzelleInstantNotary'
include ':react-native-otp-verify'
project(':react-native-otp-verify').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-otp-verify/android')
include ':react-native-image-picker'
project(':react-native-image-picker').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-image-picker/android')

Loading

0 comments on commit 6ffdb37

Please sign in to comment.