Skip to content

Commit

Permalink
fix: Added fix for qr code download link mismatch data type (#837)
Browse files Browse the repository at this point in the history
* org did not foud issue resolved in issuance flow

Signed-off-by: prasadgkalamkar <[email protected]>

* Removed unwanted files

Signed-off-by: prasadgkalamkar <[email protected]>

* Added fix for qr code download link mismatch data type

Signed-off-by: prasadgkalamkar <[email protected]>

---------

Signed-off-by: prasadgkalamkar <[email protected]>
  • Loading branch information
prasadgkalamkar authored Dec 19, 2024
1 parent 96358e2 commit a90f0f8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/commonComponents/QRcode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import domtoimage from 'dom-to-image';

const CustomQRCode = ({ value, size }: { value: string, size: number }) => {

const inputRef = useRef<HTMLInputElement>(null);
const node = document.createTextNode('');
const inputRef = useRef<Node>(node);
const [isCopied, setIsCopied] = useState(false);

function copyTextVal(e: React.MouseEvent<HTMLButtonElement>) {
Expand All @@ -24,7 +25,7 @@ const CustomQRCode = ({ value, size }: { value: string, size: number }) => {
}

const drawHtmlToCanvas = () => {
domtoimage.toJpeg(inputRef.current, { quality: 0.95 })
domtoimage.toJpeg(inputRef.current, { quality: 0.95 })
.then(function (dataUrl) {
var link = document.createElement('a');
link.download = 'my-image-name.jpeg';
Expand Down

0 comments on commit a90f0f8

Please sign in to comment.