Prerelease#6
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Owner
Author
|
@copilot review the PR |
- Add internationalization (i18n) to QrCodeScanner component using next-intl - Extract hardcoded UI strings: "Start Camera", "Stop Scanning", camera error messages - Add QrCodeScanner translation keys across all 24 supported languages - Follow existing translation conventions used in other components - Fix ShareQrCodeDialog to support multiple instances on same page - Replace hardcoded id="qr-code-svg" with per-instance unique id via useId() - Update handleDownload to reference dynamic id instead of document.getElementById() - Ensures no DOM id conflicts when multiple dialogs are rendered
There was a problem hiding this comment.
Pull request overview
This PR introduces improvements to QR code functionality in the application, including better ID generation and internationalization support. The changes replace hardcoded and randomly-generated element IDs with React's useId() hook and add translation support for QR code scanner messages.
Changes:
- Replaced hardcoded and random element IDs with React's
useId()hook for better SSR compatibility and following React best practices - Added internationalization support for QR code scanner error messages and UI text
- Added new translation keys for QR code sharing and scanning features in English
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/components/share-qr-code-dialog.tsx | Replaced hardcoded 'qr-code-svg' ID with useId() hook for dynamic, unique ID generation |
| src/components/qr-code-scanner.tsx | Replaced Math.random()-based ID with useId(), added internationalization for all user-facing text |
| messages/en-US.json | Added translation keys for scanner UI elements and QR code sharing dialog |
| package-lock.json | Added dependencies for html5-qrcode and qrcode.react packages (with duplicate entries that need resolution) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.