Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to custom-rendered QR codes #220

Merged
merged 2 commits into from
Aug 7, 2024
Merged

Switch to custom-rendered QR codes #220

merged 2 commits into from
Aug 7, 2024

Conversation

jribbink
Copy link
Contributor

@jribbink jribbink commented Aug 1, 2024

Closes #212

Screenshot 2024-08-07 at 10 36 26 AM

Copy link

vercel bot commented Aug 1, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
fcl-discovery ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 7, 2024 5:37pm

@jribbink jribbink changed the title [WIP] Jribbink/enhance qr Switch to custom-rendered QR codes Aug 7, 2024
@jribbink jribbink marked this pull request as ready for review August 7, 2024 17:37
@jribbink jribbink requested a review from a team as a code owner August 7, 2024 17:37
context = document.documentElement,
) {
// Create a temporary element
const tempEl = document.createElement('div')
Copy link
Member

Choose a reason for hiding this comment

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

This is expensive. You could reuse a hidden element here if you wanted to optimize more for performance. You could also cache the result in a map by size.

Copy link
Contributor Author

@jribbink jribbink Aug 7, 2024

Choose a reason for hiding this comment

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

The QRCode component is memoized, but yea makes sense to do this indidividual function as well. I'll wrap this in a useMemo 👍

@jribbink jribbink merged commit 50fc0bd into v2 Aug 7, 2024
1 check passed
@jribbink jribbink deleted the jribbink/enhance-qr branch August 7, 2024 18:15
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