Skip to content

QR code on invite screen#331

Merged
jimmcgaw merged 1 commit intocapacitorjs2from
qr_invite
Mar 6, 2023
Merged

QR code on invite screen#331
jimmcgaw merged 1 commit intocapacitorjs2from
qr_invite

Conversation

@jimmcgaw
Copy link
Copy Markdown
Collaborator

@jimmcgaw jimmcgaw commented Mar 6, 2023

qr-code

@jimmcgaw jimmcgaw requested a review from elimisteve March 6, 2023 06:11
Comment thread src/components/modals/SharingModal.js
Comment thread src/components/modals/SharingModal.js Outdated

const [showQRCode, setShowQRCode] = useState(false);

const inviteLink = getWindowLocationHref();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jimmcgaw To avoid race conditions please run getWindowLocationHref() as late as possible. On mobile, the app loads with window.location.href === 'http://www.leapchat.org', with no URL hash ☹️ .

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<FaQrcode size={15} />
</Button>
<div className="qr-code">
{showQRCode && <QRCode value={inviteLink} />}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...which is to say: please tweak this to say {showQRCode && <QRCode value={getWindowLocationHref()} />}

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did it slightly differently, but done.

@jimmcgaw jimmcgaw merged commit d4951e5 into capacitorjs2 Mar 6, 2023
@elimisteve elimisteve deleted the qr_invite branch March 6, 2023 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants