diff --git a/src/pages/QRCodeGenerator.jsx b/src/pages/QRCodeGenerator.jsx index 5eab106..802ebd0 100644 --- a/src/pages/QRCodeGenerator.jsx +++ b/src/pages/QRCodeGenerator.jsx @@ -1,8 +1,48 @@ +import { Button } from "@/components/ui/button"; +import { Input } from "@/components/ui/input"; +import QRCode from "react-qr-code"; +import { useState } from "react"; const QRCodeGenerator = () => { + const [qrCode, setQrCode] = useState(""); + const [input, setInput] = useState(""); + + function handleGenerateQrCode() { + setQrCode(input); + setInput(""); + } + return ( -
QRCodeGenerator
- ) -} +
+

QR Code Generator

+
+ setInput(e.target.value)} + type="text" + name="qr-code" + value={input} + placeholder="Enter your value here" + /> + +
+
+ +
+
+ ); +}; -export default QRCodeGenerator +export default QRCodeGenerator;