From 7380feb739ac74c0dd42ba8ff02ac2afee5c0789 Mon Sep 17 00:00:00 2001 From: arsam Date: Fri, 18 Sep 2026 23:17:17 +0330 Subject: [PATCH] Import source: src/components/RightPanel/LogoSection Import the existing local project snapshot. This commit organizes existing files; it does not represent newly developed functionality. --- src/components/RightPanel/LogoSection.tsx | 62 +++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 src/components/RightPanel/LogoSection.tsx diff --git a/src/components/RightPanel/LogoSection.tsx b/src/components/RightPanel/LogoSection.tsx new file mode 100644 index 0000000..48ab7e1 --- /dev/null +++ b/src/components/RightPanel/LogoSection.tsx @@ -0,0 +1,62 @@ +import { useRef } from 'react'; +import { useQR } from '../../context/QRContext'; + +export function LogoSection() { + const { state, dispatch } = useQR(); + const fileRef = useRef(null); + + const handleFile = (e: React.ChangeEvent) => { + const file = e.target.files?.[0]; + if (!file) return; + const reader = new FileReader(); + reader.onload = ev => dispatch({ type: 'SET_LOGO', payload: ev.target?.result as string }); + reader.readAsDataURL(file); + }; + + return ( +
+

Logo

+ + + {state.logoDataUrl ? ( +
+
+ logo +
+
+ + +
+
+ ) : ( + + )} + {state.logoDataUrl && ( +

+ Error correction raised to High (H) automatically. +

+ )} +
+ ); +}