Skip to content

Commit 185c92b

Browse files
committed
update
1 parent 300ada2 commit 185c92b

3 files changed

Lines changed: 8 additions & 3 deletions

File tree

src/QRCodeCanvas.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ const QRCodeCanvas = React.forwardRef<HTMLCanvasElement, QRPropsCanvas>(
2626
marginSize,
2727
style,
2828
imageSettings,
29+
boostLevel,
2930
...otherProps
3031
} = props;
3132
const imgSrc = imageSettings?.src;
@@ -54,6 +55,7 @@ const QRCodeCanvas = React.forwardRef<HTMLCanvasElement, QRPropsCanvas>(
5455
marginSize,
5556
imageSettings,
5657
size,
58+
boostLevel,
5759
});
5860

5961
React.useEffect(() => {
@@ -134,6 +136,7 @@ const QRCodeCanvas = React.forwardRef<HTMLCanvasElement, QRPropsCanvas>(
134136
if (imgSrc != null) {
135137
img = (
136138
<img
139+
alt="QR-Code"
137140
src={imgSrc}
138141
key={imgSrc}
139142
style={{ display: 'none' }}

src/QRCodeSVG.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ const QRCodeSVG = React.forwardRef<SVGSVGElement, QRPropsSVG>((props, ref) => {
2424
title,
2525
marginSize,
2626
imageSettings,
27+
boostLevel,
2728
...otherProps
2829
} = props;
2930

@@ -35,6 +36,7 @@ const QRCodeSVG = React.forwardRef<SVGSVGElement, QRPropsSVG>((props, ref) => {
3536
marginSize,
3637
imageSettings,
3738
size,
39+
boostLevel,
3840
});
3941

4042
let cellsToDraw = cells;

src/hooks/useQRCode.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ export const useQRCode = (opt: Options) => {
2828

2929
const memoizedQrcode = React.useMemo<QrCode>(() => {
3030
const values = Array.isArray(value) ? value : [value];
31-
const segments = values.reduce<QrSegment[]>((accum, v) => {
32-
accum.push(...QrSegment.makeSegments(v));
33-
return accum;
31+
const segments = values.reduce<QrSegment[]>((acc, v) => {
32+
acc.push(...QrSegment.makeSegments(v));
33+
return acc;
3434
}, []);
3535
return QrCode.encodeSegments(
3636
segments,

0 commit comments

Comments
 (0)