mirror of
https://github.com/selfxyz/self.git
synced 2026-04-27 03:01:15 -04:00
refresh qr code on size change
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@proofofpassport/sdk",
|
||||
"version": "1.8.3",
|
||||
"name": "@openpassport/sdk",
|
||||
"version": "0.1.0",
|
||||
"main": "dist/sdk/src/index.js",
|
||||
"types": "dist/sdk/src/index.d.ts",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/zk-passport/proof-of-passport"
|
||||
"url": "https://github.com/zk-passport/openpassport"
|
||||
},
|
||||
"author": "turnoffthiscomputer",
|
||||
"dependencies": {
|
||||
@@ -64,5 +64,8 @@
|
||||
"common",
|
||||
"circuits/**/*.json",
|
||||
"src/QRcode"
|
||||
]
|
||||
],
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
}
|
||||
@@ -125,7 +125,7 @@ const OpenPassportQRcode = ({
|
||||
return () => {
|
||||
newSocket.disconnect();
|
||||
};
|
||||
}, [sessionId, scope, requirements, devMode, onSuccess]);
|
||||
}, [sessionId, scope, requirements, devMode, onSuccess, size]);
|
||||
|
||||
useEffect(() => {
|
||||
if (qrElement && qrcodeRef.current) {
|
||||
@@ -146,7 +146,7 @@ const OpenPassportQRcode = ({
|
||||
<LED
|
||||
connectionStatus={connectionStatus as 'disconnected' | 'web_connected' | 'mobile_connected'}
|
||||
/>
|
||||
<div className="w-[300px] h-[300px] flex items-center justify-center">
|
||||
<div style={{ width: `${size}px`, height: `${size}px` }} className="flex items-center justify-center">
|
||||
{(() => {
|
||||
switch (proofStep) {
|
||||
case ProofSteps.WAITING_FOR_MOBILE:
|
||||
|
||||
Reference in New Issue
Block a user