(event: React.ChangeEvent<HTMLInputElement>)
| 130 | |
| 131 | // Handle image capture from camera |
| 132 | const handleImageCapture = (event: React.ChangeEvent<HTMLInputElement>) => { |
| 133 | const file = event.target.files?.[0]; |
| 134 | if (!file) return; |
| 135 | |
| 136 | const reader = new FileReader(); |
| 137 | reader.onload = (e) => { |
| 138 | const dataUrl = e.target?.result as string; |
| 139 | setCapturedImage(dataUrl); |
| 140 | }; |
| 141 | reader.readAsDataURL(file); |
| 142 | |
| 143 | // Reset input so same file can be selected again |
| 144 | if (fileInputRef.current) { |
| 145 | fileInputRef.current.value = ''; |
| 146 | } |
| 147 | }; |
| 148 | |
| 149 | // Remove captured image |
| 150 | const removeImage = () => { |
nothing calls this directly
no outgoing calls
no test coverage detected