mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-18 11:49:19 +00:00
fix: qrcode modal throwing error when no whatsappId
This commit is contained in:
@@ -12,6 +12,7 @@ const QrcodeModal = ({ open, onClose, whatsAppId }) => {
|
||||
|
||||
useEffect(() => {
|
||||
const fetchSession = async () => {
|
||||
if (!whatsAppId) return;
|
||||
try {
|
||||
const { data } = await api.get(`/whatsapp/${whatsAppId}`);
|
||||
setQrCode(data.qrcode);
|
||||
|
||||
@@ -199,13 +199,13 @@ const Connections = () => {
|
||||
>
|
||||
Are you sure? It cannot be reverted.
|
||||
</ConfirmationModal>
|
||||
{/* <QrcodeModal
|
||||
<QrcodeModal
|
||||
open={qrModalOpen}
|
||||
onClose={handleCloseQrModal}
|
||||
whatsAppId={
|
||||
selectedWhatsApp && !whatsAppModalOpen && selectedWhatsApp.id
|
||||
}
|
||||
/> */}
|
||||
/>
|
||||
<WhatsAppModal
|
||||
open={whatsAppModalOpen}
|
||||
onClose={handleCloseWhatsAppModal}
|
||||
|
||||
Reference in New Issue
Block a user