import React from 'react'; import { QRCode, Button } from 'antd'; const downloadQRCode = () => { const canvas = document.getElementById('myqrcode')?.querySelector('canvas'); if (canvas) { const url = canvas.toDataURL(); const a = document.createElement('a'); a.download = 'QRCode.png'; a.href = url; document.body.appendChild(a); a.click(); document.body.removeChild(a); } }; const App: React.FC = () => (
); export default App;