Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions react-common/components/share/ShareInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -531,13 +531,15 @@ export const ShareInfo = (props: ShareInfoProps) => {
onClick={handleDeviceShareClick} />
}
</div>
<Button
className="menu-button project-qrcode"
buttonRef={handleQRCodeButtonRef}
title={lf("Show QR Code")}
label={<img className="qrcode-image" src={shareData?.qr} alt={lf("QR code to access your project")} aria-label={lf("Project share link QR code")}/>}
onClick={handleQRCodeClick}
/>
{shareData?.qr &&
<Button
className="menu-button project-qrcode"
buttonRef={handleQRCodeButtonRef}
title={lf("Show QR Code")}
label={<img className="qrcode-image" src={shareData.qr} alt={lf("QR code to access your project")} aria-label={lf("Project share link QR code")}/>}
onClick={handleQRCodeClick}
/>
}
</div>
</div>
}
Expand Down Expand Up @@ -584,10 +586,10 @@ export const ShareInfo = (props: ShareInfoProps) => {
simRecorder={simRecorder}/>}
</div>

{showQRCode &&
{showQRCode && shareData?.qr &&
<Modal title={lf("QR Code")} onClose={handleQRCodeModalClose} ariaLabel={lf("QR Code modal")} >
<div className="qrcode-modal-body">
<img className="qrcode-image" src={shareData?.qr} alt={lf("QR code to access your project")} aria-label={lf("Project share link QR code enlarged")} />
<img className="qrcode-image" src={shareData.qr} alt={lf("QR code to access your project")} aria-label={lf("Project share link QR code enlarged")} />
</div>
</Modal>
}
Expand Down