Skip to content

Commit

Permalink
added handler service
Browse files Browse the repository at this point in the history
  • Loading branch information
opensrc0 committed Mar 4, 2024
1 parent cd4d3ff commit 0ea455a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
13 changes: 13 additions & 0 deletions __app/component/Scanner/Gallery.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,19 @@ Gallery.propTypes = {
};

Gallery.defaultProps = {
disbaleToast: false,
successCb: () => {},
failureCb: () => {},
successMsg: '',
failureMsg: {
unSupported: '',
streaming: '',
barCodeDetection: '',
invalidImage: '',
flash: '',
unableToScan: '',
},
zIndex: 9,
color: 'white',
top: 'auto',
bottom: '18%',
Expand Down
4 changes: 2 additions & 2 deletions __app/component/services/handler.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export const handleSuccess = ({ disbaleToast, msg, msgType, successCb, data }) => {
console.log(msgType);
if (!disbaleToast && msg) console.log('Success:', msg);
console.log(msgType, data);
if (!disbaleToast && msg) console.log('Success:', data);
successCb({
msgType,
msg,
Expand Down
4 changes: 1 addition & 3 deletions __app/component/utils/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,4 @@ export const browserDimensions = () => ({
),
});

export const saveLocal = () => {

};
export const IsValidUPI = (url = '') => (url.search(/upi:\/\/pay\?pa=/) !== -1);

0 comments on commit 0ea455a

Please sign in to comment.