@opexa/portal-components 0.0.560 → 0.0.561

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { isBoolean, isObject } from 'lodash-es';
1
+ import { isBoolean } from 'lodash-es';
2
2
  import { useCallback, useEffect, useMemo, useRef, useState, } from 'react';
3
3
  import invariant from 'tiny-invariant';
4
4
  import { useMediaQuery } from 'usehooks-ts';
@@ -10,7 +10,6 @@ export function useCamera(options = {}) {
10
10
  const [loading, setLoading] = useState(false);
11
11
  const [snapping, setSnapping] = useState(false);
12
12
  const desktop = useMediaQuery('(min-width: 1024px)');
13
- const [mirror, setMirror] = useState(false);
14
13
  const open = useCallback(async () => {
15
14
  setData(null);
16
15
  setError(null);
@@ -51,11 +50,6 @@ export function useCamera(options = {}) {
51
50
  });
52
51
  node.srcObject = result;
53
52
  streamRef.current = result;
54
- setMirror(!isObject(options.video)
55
- ? true
56
- : options.video.facingMode === 'environment'
57
- ? false
58
- : true);
59
53
  }
60
54
  catch (e) {
61
55
  if (e instanceof Error) {
@@ -110,10 +104,6 @@ export function useCamera(options = {}) {
110
104
  canvas.height = video.videoHeight;
111
105
  context.imageSmoothingEnabled = true;
112
106
  context.imageSmoothingQuality = 'high';
113
- if (mirror) {
114
- context.translate(canvas.width, 0);
115
- context.scale(-1, 1);
116
- }
117
107
  context.drawImage(video, 0, 0, video.videoWidth, video.videoHeight);
118
108
  return new Promise((resolve) => {
119
109
  canvas.toBlob(async (blob) => {
@@ -169,7 +159,7 @@ export function useCamera(options = {}) {
169
159
  setSnapping(false);
170
160
  }, 'image/jpeg', 1);
171
161
  });
172
- }, [mirror, options]);
162
+ }, [options]);
173
163
  const reset = useCallback(() => {
174
164
  setData(null);
175
165
  setError(null);
@@ -197,10 +187,9 @@ export function useCamera(options = {}) {
197
187
  position: 'relative',
198
188
  boxSizing: 'border-box',
199
189
  background: 'transparent',
200
- transform: mirror ? 'scaleX(-1)' : 'none',
201
190
  pointerEvents: 'none',
202
191
  },
203
- }), [mirror]);
192
+ }), []);
204
193
  useEffect(() => {
205
194
  return () => {
206
195
  setData(null);
@@ -2,9 +2,9 @@
2
2
  import { usePathname } from 'next/navigation';
3
3
  import { useEffect } from 'react';
4
4
  import { useAccountQuery } from '../../client/hooks/useAccountQuery.js';
5
+ import { useFeatureFlag } from '../../client/hooks/useFeatureFlag.js';
5
6
  import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
6
7
  import { useMemberVerificationQuery } from '../../client/hooks/useMemberVerificationQuery.js';
7
- import { useFeatureFlag } from '../../client/hooks/useFeatureFlag.js';
8
8
  export function KycOpenOnHomeMount(props) {
9
9
  const featureFlag = useFeatureFlag();
10
10
  const setkycReminderOpen = useGlobalStore((s) => s.kycReminder.setOpen);
@@ -66,6 +66,8 @@ export function KycOpenOnHomeMount(props) {
66
66
  accountLoading,
67
67
  hasntCompletedKYC,
68
68
  isVerificationLocked,
69
+ isPending,
70
+ featureFlag.enabled,
69
71
  ]);
70
72
  return null;
71
73
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opexa/portal-components",
3
- "version": "0.0.560",
3
+ "version": "0.0.561",
4
4
  "exports": {
5
5
  "./ui/*": {
6
6
  "types": "./dist/ui/*/index.d.ts",