mirror of
				https://gitlab.nic.cz/turris/reforis/foris-js.git
				synced 2025-11-03 23:00:31 +01:00 
			
		
		
		
	Replace deprecated QRCode component with QRCodeSVG
This commit is contained in:
		@@ -1,5 +1,5 @@
 | 
				
			|||||||
/*
 | 
					/*
 | 
				
			||||||
 * Copyright (C) 2019-2024 CZ.NIC z.s.p.o. (https://www.nic.cz/)
 | 
					 * Copyright (C) 2019-2025 CZ.NIC z.s.p.o. (https://www.nic.cz/)
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * This is free software, licensed under the GNU General Public License v3.
 | 
					 * This is free software, licensed under the GNU General Public License v3.
 | 
				
			||||||
 * See /LICENSE for more information.
 | 
					 * See /LICENSE for more information.
 | 
				
			||||||
@@ -9,7 +9,7 @@ import React, { useState } from "react";
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
 | 
					import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
 | 
				
			||||||
import PropTypes from "prop-types";
 | 
					import PropTypes from "prop-types";
 | 
				
			||||||
import QRCode from "qrcode.react";
 | 
					import { QRCodeSVG } from "qrcode.react";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { createAndDownloadPdf, toQRCodeContent } from "./qrCodeHelpers";
 | 
					import { createAndDownloadPdf, toQRCodeContent } from "./qrCodeHelpers";
 | 
				
			||||||
import Button from "../../bootstrap/Button";
 | 
					import Button from "../../bootstrap/Button";
 | 
				
			||||||
@@ -69,13 +69,12 @@ function QRCodeModal({ shown, setShown, SSID, password }) {
 | 
				
			|||||||
        <Modal setShown={setShown} shown={shown}>
 | 
					        <Modal setShown={setShown} shown={shown}>
 | 
				
			||||||
            <ModalHeader setShown={setShown} title={_("Wi-Fi QR Code")} />
 | 
					            <ModalHeader setShown={setShown} title={_("Wi-Fi QR Code")} />
 | 
				
			||||||
            <ModalBody>
 | 
					            <ModalBody>
 | 
				
			||||||
                <QRCode
 | 
					                <QRCodeSVG
 | 
				
			||||||
                    className="d-block mx-auto img-logo-black"
 | 
					                    className="d-block mx-auto img-logo-black"
 | 
				
			||||||
                    renderAs="svg"
 | 
					 | 
				
			||||||
                    value={toQRCodeContent(SSID, password)}
 | 
					                    value={toQRCodeContent(SSID, password)}
 | 
				
			||||||
                    level="M"
 | 
					                    level="M"
 | 
				
			||||||
                    size={350}
 | 
					                    size={350}
 | 
				
			||||||
                    includeMargin
 | 
					                    marginSize={0}
 | 
				
			||||||
                />
 | 
					                />
 | 
				
			||||||
            </ModalBody>
 | 
					            </ModalBody>
 | 
				
			||||||
            <ModalFooter>
 | 
					            <ModalFooter>
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user