I have created QRcode using QRCode.toDataURL() function and added returned value to an SVG file. its working correctly on desktop but it shows nothing on mobile. Here is the output link:https://portal.coach.wordupapp.co/cert?no=ec475bf4-83f3-4f17-8878-2365643e01d0
I create base64 string here:
const fetchBarCode = () => {
QRCode.toDataURL(certificate?.certificateURL ?? " ",
{
color: {
dark: '#7B4BA2',
light: '#FFFFFF'
},
margin: 0
})
.then(url => {
setBarCode(url);
})
.catch(err => {
console.error(err)
})
}
and use it here in an svg file:
<image
xlinkHref={barCode}
id="k"
width={1024}
height={1024}>
</image>