Skip to content

Commit

Permalink
profile QR code (#42)
Browse files Browse the repository at this point in the history
Adds QR code feature:
* QR code screen that can be opened from the profile screen (from a
button in header). QR code contains user's username encoded and can be
shared;
* QR code scan feature on Who-Invited-You welcome screen, that
simplifies username input.

Also:
* Refactor InviteShare screen since initially it shared most of the UI
with QRCodeShare screen;
* Groupes common button components to `@components/Buttons/**`;
* Adds `unsafeUserSelector`;
* Refactors Profile -> `AvatarHeader`;
* Adds `share` service.
  • Loading branch information
ice-orion authored Apr 25, 2023
1 parent 93e130d commit c2210f0
Show file tree
Hide file tree
Showing 142 changed files with 1,567 additions and 638 deletions.
4 changes: 4 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ module.exports = {
message:
'Please use useSafeAreaFrame from @hooks/useSafeAreaFrame or useSafeAreaInsets from @hooks/useSafeAreaInsets',
},
{
name: 'react-native-share',
message: 'Please use custom wrapper from @services/share',
},
],
},
],
Expand Down
7 changes: 6 additions & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,12 @@ module.exports = api => {
},
},
],
'react-native-reanimated/plugin',
[
'react-native-reanimated/plugin',
{
globals: ['__scanCodes'], // https://github.com/rodgomesc/vision-camera-code-scanner#installation
},
],
],
exclude: ['**/*.png', '**/*.jpg', '**/*.gif'],
};
Expand Down
1 change: 1 addition & 0 deletions ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ target 'ice' do

pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
pod 'Permission-Contacts', :path => "#{permissions_path}/Contacts"
pod 'Permission-Camera', :path => "#{permissions_path}/Camera"
pod 'Permission-Notifications', :path => "#{permissions_path}/Notifications"
pod 'ReactNativeMoEngage', :path => '../node_modules/react-native-moengage'

Expand Down
84 changes: 81 additions & 3 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,27 @@ PODS:
- GoogleUtilities/Environment (~> 7.7)
- nanopb (< 2.30910.0, >= 2.30908.0)
- PromisesObjC (< 3.0, >= 1.2)
- GoogleMLKit/BarcodeScanning (4.0.0):
- GoogleMLKit/MLKitCore
- MLKitBarcodeScanning (~> 3.0.0)
- GoogleMLKit/MLKitCore (4.0.0):
- MLKitCommon (~> 9.0.0)
- GoogleSignIn (6.2.4):
- AppAuth (~> 1.5)
- GTMAppAuth (~> 1.3)
- GTMSessionFetcher/Core (< 3.0, >= 1.1)
- GoogleToolboxForMac/DebugUtils (2.3.2):
- GoogleToolboxForMac/Defines (= 2.3.2)
- GoogleToolboxForMac/Defines (2.3.2)
- GoogleToolboxForMac/Logger (2.3.2):
- GoogleToolboxForMac/Defines (= 2.3.2)
- "GoogleToolboxForMac/NSData+zlib (2.3.2)":
- GoogleToolboxForMac/Defines (= 2.3.2)
- "GoogleToolboxForMac/NSDictionary+URLArguments (2.3.2)":
- GoogleToolboxForMac/DebugUtils (= 2.3.2)
- GoogleToolboxForMac/Defines (= 2.3.2)
- "GoogleToolboxForMac/NSString+URLArguments (= 2.3.2)"
- "GoogleToolboxForMac/NSString+URLArguments (2.3.2)"
- GoogleUtilities (7.11.1):
- GoogleUtilities/AppDelegateSwizzler (= 7.11.1)
- GoogleUtilities/Environment (= 7.11.1)
Expand Down Expand Up @@ -225,6 +242,8 @@ PODS:
- GoogleUtilities/MethodSwizzler
- GoogleUtilities/UserDefaults (7.11.1):
- GoogleUtilities/Logger
- GoogleUtilitiesComponents (1.1.0):
- GoogleUtilities/Logger
- GTMAppAuth (1.3.1):
- AppAuth/Core (~> 1.6)
- GTMSessionFetcher/Core (< 3.0, >= 1.5)
Expand All @@ -235,6 +254,24 @@ PODS:
- lottie-react-native (5.1.4):
- lottie-ios (~> 3.4.0)
- React-Core
- MLImage (1.0.0-beta4)
- MLKitBarcodeScanning (3.0.0):
- MLKitCommon (~> 9.0)
- MLKitVision (~> 5.0)
- MLKitCommon (9.0.0):
- GoogleDataTransport (~> 9.0)
- GoogleToolboxForMac/Logger (~> 2.1)
- "GoogleToolboxForMac/NSData+zlib (~> 2.1)"
- "GoogleToolboxForMac/NSDictionary+URLArguments (~> 2.1)"
- GoogleUtilities/UserDefaults (~> 7.0)
- GoogleUtilitiesComponents (~> 1.0)
- GTMSessionFetcher/Core (< 3.0, >= 1.1)
- MLKitVision (5.0.0):
- GoogleToolboxForMac/Logger (~> 2.1)
- "GoogleToolboxForMac/NSData+zlib (~> 2.1)"
- GTMSessionFetcher/Core (< 3.0, >= 1.1)
- MLImage (= 1.0.0-beta4)
- MLKitCommon (~> 9.0)
- MoEngage-iOS-SDK (9.4.1)
- MoEngageInApp (4.4.0):
- MoEngage-iOS-SDK (< 9.5.0, >= 9.4.0)
Expand All @@ -249,6 +286,8 @@ PODS:
- nanopb/decode (2.30909.0)
- nanopb/encode (2.30909.0)
- OpenSSL-Universal (1.1.1100)
- Permission-Camera (3.6.1):
- RNPermissions
- Permission-Contacts (3.6.1):
- RNPermissions
- Permission-Notifications (3.6.1):
Expand Down Expand Up @@ -518,6 +557,8 @@ PODS:
- react-native-twitter-signin (1.2.0):
- React
- TwitterKit5
- react-native-view-shot (3.6.0):
- React-Core
- React-perflogger (0.70.8)
- React-RCTActionSheet (0.70.8):
- React-Core/RCTActionSheetHeaders (= 0.70.8)
Expand Down Expand Up @@ -640,7 +681,7 @@ PODS:
- React-Core
- RNReactNativeHapticFeedback (1.14.0):
- React-Core
- RNReanimated (2.13.0):
- RNReanimated (2.16.0):
- DoubleConversion
- FBLazyVector
- FBReactNativeSpec
Expand Down Expand Up @@ -692,6 +733,13 @@ PODS:
- TwitterCore (3.2.0)
- TwitterKit5 (5.2.0):
- TwitterCore (>= 3.1.0)
- vision-camera-code-scanner (0.2.0):
- GoogleMLKit/BarcodeScanning
- React-Core
- VisionCamera (2.15.4):
- React
- React-callinvoker
- React-Core
- Yoga (1.14.0)
- YogaKit (1.18.1):
- Yoga (~> 1.14)
Expand Down Expand Up @@ -733,6 +781,7 @@ DEPENDENCIES:
- lottie-react-native (from `../node_modules/lottie-react-native`)
- MoEngageRichNotification
- OpenSSL-Universal (= 1.1.1100)
- Permission-Camera (from `../node_modules/react-native-permissions/ios/Camera`)
- Permission-Contacts (from `../node_modules/react-native-permissions/ios/Contacts`)
- Permission-Notifications (from `../node_modules/react-native-permissions/ios/Notifications`)
- RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`)
Expand Down Expand Up @@ -761,6 +810,7 @@ DEPENDENCIES:
- react-native-restart (from `../node_modules/react-native-restart`)
- react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`)
- "react-native-twitter-signin (from `../node_modules/@react-native-twitter-signin/twitter-signin`)"
- react-native-view-shot (from `../node_modules/react-native-view-shot`)
- React-perflogger (from `../node_modules/react-native/ReactCommon/reactperflogger`)
- React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`)
- React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`)
Expand Down Expand Up @@ -799,6 +849,8 @@ DEPENDENCIES:
- RNShare (from `../node_modules/react-native-share`)
- RNSound (from `../node_modules/react-native-sound`)
- RNSVG (from `../node_modules/react-native-svg`)
- vision-camera-code-scanner (from `../node_modules/vision-camera-code-scanner`)
- VisionCamera (from `../node_modules/react-native-vision-camera`)
- Yoga (from `../node_modules/react-native/ReactCommon/yoga`)

SPEC REPOS:
Expand Down Expand Up @@ -831,12 +883,19 @@ SPEC REPOS:
- fmt
- GoogleAppMeasurement
- GoogleDataTransport
- GoogleMLKit
- GoogleSignIn
- GoogleToolboxForMac
- GoogleUtilities
- GoogleUtilitiesComponents
- GTMAppAuth
- GTMSessionFetcher
- libevent
- lottie-ios
- MLImage
- MLKitBarcodeScanning
- MLKitCommon
- MLKitVision
- MoEngage-iOS-SDK
- MoEngageInApp
- MoEngagePluginBase
Expand Down Expand Up @@ -869,6 +928,8 @@ EXTERNAL SOURCES:
:podspec: "../node_modules/react-native/sdks/hermes/hermes-engine.podspec"
lottie-react-native:
:path: "../node_modules/lottie-react-native"
Permission-Camera:
:path: "../node_modules/react-native-permissions/ios/Camera"
Permission-Contacts:
:path: "../node_modules/react-native-permissions/ios/Contacts"
Permission-Notifications:
Expand Down Expand Up @@ -921,6 +982,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native-safe-area-context"
react-native-twitter-signin:
:path: "../node_modules/@react-native-twitter-signin/twitter-signin"
react-native-view-shot:
:path: "../node_modules/react-native-view-shot"
React-perflogger:
:path: "../node_modules/react-native/ReactCommon/reactperflogger"
React-RCTActionSheet:
Expand Down Expand Up @@ -997,6 +1060,10 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native-sound"
RNSVG:
:path: "../node_modules/react-native-svg"
vision-camera-code-scanner:
:path: "../node_modules/vision-camera-code-scanner"
VisionCamera:
:path: "../node_modules/react-native-vision-camera"
Yoga:
:path: "../node_modules/react-native/ReactCommon/yoga"

Expand Down Expand Up @@ -1035,20 +1102,28 @@ SPEC CHECKSUMS:
glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b
GoogleAppMeasurement: 3bc3a6484b7bb20dd8489242c4dd3c92a3e5107b
GoogleDataTransport: 8378d1fa8ac49753ea6ce70d65a7cb70ce5f66e6
GoogleMLKit: 2bd0dc6253c4d4f227aad460f69215a504b2980e
GoogleSignIn: 5651ce3a61e56ca864160e79b484cd9ed3f49b7a
GoogleToolboxForMac: 8bef7c7c5cf7291c687cf5354f39f9db6399ad34
GoogleUtilities: 9aa0ad5a7bc171f8bae016300bfcfa3fb8425749
GoogleUtilitiesComponents: 679b2c881db3b615a2777504623df6122dd20afe
GTMAppAuth: 0ff230db599948a9ad7470ca667337803b3fc4dd
GTMSessionFetcher: 3a63d75eecd6aa32c2fc79f578064e1214dfdec2
hermes-engine: 0b19f33a9c2ec1dbdede3232606eeb1101db4cec
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
lottie-ios: 8f97d3271e155c2d688875c29cd3c74908aef5f8
lottie-react-native: b702fab740cdb952a8e2354713d3beda63ff97b0
MLImage: 7bb7c4264164ade9bf64f679b40fb29c8f33ee9b
MLKitBarcodeScanning: 04e264482c5f3810cb89ebc134ef6b61e67db505
MLKitCommon: c1b791c3e667091918d91bda4bba69a91011e390
MLKitVision: 8baa5f46ee3352614169b85250574fde38c36f49
MoEngage-iOS-SDK: b7af14646f44852527ba7420e52ff8bb56b7077d
MoEngageInApp: 94f24b0b1a83ec247dc998f31b08124b09fcab96
MoEngagePluginBase: e865f388c39d0cf2c7847610876e63b0e5e31c22
MoEngageRichNotification: 007cb006358994209e017c6ce52808809cf0b3fc
nanopb: b552cce312b6c8484180ef47159bc0f65a1f0431
OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c
Permission-Camera: bf6791b17c7f614b6826019fcfdcc286d3a107f6
Permission-Contacts: 2484d274171688b1ca80978b949ac771259b51f0
Permission-Notifications: 150484ae586eb9be4e32217582a78350a9bb31c3
PromisesObjC: 09985d6d70fbe7878040aa746d78236e6946d2ef
Expand Down Expand Up @@ -1076,6 +1151,7 @@ SPEC CHECKSUMS:
react-native-restart: 7595693413fe3ca15893702f2c8306c62a708162
react-native-safe-area-context: 99b24a0c5acd0d5dcac2b1a7f18c49ea317be99a
react-native-twitter-signin: 423e8d20eb26fddc14852d3f1435a8b39358f49d
react-native-view-shot: 705f999ac2a24e4e6c909c0ca65c732ed33ca2ff
React-perflogger: e9249a18e055cae96fdf685bf6145cbea62506c8
React-RCTActionSheet: a6d2a544a4605a111ce80fa9319cc870ca3ea778
React-RCTAnimation: 21b776b15aa5451a0b5bcb342fd2f346817c1101
Expand Down Expand Up @@ -1107,7 +1183,7 @@ SPEC CHECKSUMS:
RNPermissions: dcdb7b99796bbeda6975a6e79ad519c41b251b1c
RNRate: ef3bcff84f39bb1d1e41c5593d3eea4aab2bd73a
RNReactNativeHapticFeedback: 1e3efeca9628ff9876ee7cdd9edec1b336913f8c
RNReanimated: ce445c233a6ff5600223484a88ad5704945d972a
RNReanimated: 436a3a1eca0e6dd0ab7507189f62c87f601daba6
RNScreens: 40a2cb40a02a609938137a1e0acfbf8fc9eebf19
RNSentry: eff1f32fe84682feb09a36c5e5f513d6ef964b70
RNSha256: 80bea5b2e7005f813f6438cb41e573b3d531146c
Expand All @@ -1120,9 +1196,11 @@ SPEC CHECKSUMS:
TOCropViewController: edfd4f25713d56905ad1e0b9f5be3fbe0f59c863
TwitterCore: 8cbc9ad34d91c63a0035ea05bfbfc0d7ca72a28c
TwitterKit5: 64095dfefcf39be2355711ef27112d55e340d90e
vision-camera-code-scanner: dda884a7f3ec8243a2a6d6489b91860648371bca
VisionCamera: e9a95af10e00aaebe99d648ff4519fd336e16ffe
Yoga: d6133108734e69e8c0becc6ba587294b94829687
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a

PODFILE CHECKSUM: a0a70da9b17b6dcb979881a8adf8d0c60ce75015
PODFILE CHECKSUM: f2f9a829491725083020e6fb3920d99dc7e56e4b

COCOAPODS: 1.11.3
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
"lodash": "^4.17.21",
"lottie-react-native": "^5.1.4",
"node-libs-browser": "^2.2.1",
"qrcode": "^1.5.1",
"react": "18.1.0",
"react-native": "0.70.8",
"react-native-awesome-slider": "^2.3.0",
Expand All @@ -85,7 +86,7 @@
"react-native-pager-view": "6.1.1",
"react-native-permissions": "^3.6.1",
"react-native-rate": "^1.2.12",
"react-native-reanimated": "2.13.0",
"react-native-reanimated": "2.15.0",
"react-native-restart": "^0.0.27",
"react-native-safe-area-context": "^4.4.1",
"react-native-screens": "3.13.1",
Expand All @@ -95,6 +96,8 @@
"react-native-sound": "^0.11.2",
"react-native-store-version": "^1.4.1",
"react-native-svg": "^13.6.0",
"react-native-view-shot": "^3.6.0",
"react-native-vision-camera": "^2.15.4",
"react-redux": "^8.0.5",
"react-string-replace": "^1.1.0",
"redux": "^4.2.0",
Expand All @@ -104,6 +107,7 @@
"rn-android-keyboard-adjust": "^2.1.2",
"rn-units": "^2.0.5",
"url-parse": "^1.5.10",
"vision-camera-code-scanner": "^0.2.0",
"yarn": "^1.22.19"
},
"devDependencies": {
Expand All @@ -118,6 +122,7 @@
"@types/i18n-js": "^3.8.3",
"@types/jest": "^29.2.3",
"@types/lodash": "^4.14.189",
"@types/qrcode": "^1.5.0",
"@types/react-native": "0.70.6",
"@types/react-test-renderer": "^18.0.0",
"@types/url-parse": "^1.4.8",
Expand Down
Loading

0 comments on commit c2210f0

Please sign in to comment.