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);
|
||||
|
||||
Reference in New Issue
Block a user