Fix: QR code not rendering
The QR code was not appearing, likely due to a base64 conversion issue.
This commit is contained in:
parent
ae584bce96
commit
e7b86b26ea
@ -166,7 +166,8 @@ const WhatsApp = () => {
|
|||||||
|
|
||||||
// Using the "code" field from the response as the QR code data
|
// Using the "code" field from the response as the QR code data
|
||||||
if (data && data.code) {
|
if (data && data.code) {
|
||||||
setQrCodeData(data.code);
|
// Save the base64 image data directly - it already contains the data:image prefix
|
||||||
|
setQrCodeData(data.base64);
|
||||||
} else {
|
} else {
|
||||||
setQrError("QR Code não disponível. A instância pode já estar conectada ou houve um erro na API.");
|
setQrError("QR Code não disponível. A instância pode já estar conectada ou houve um erro na API.");
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user