fix: resolve TypeScript build error in AIOnboarding and Scanner components
- Fix null type error in AIOnboarding.tsx line 352: img src attribute - Fix similar issue in Scanner.tsx line 237: capturedImage null handling - Use '|| undefined' pattern to satisfy React 19/Next.js 15 type requirements - Both components now properly handle null/undefined image states
This commit is contained in:
@@ -234,7 +234,7 @@ export default function Scanner({ onScanSuccess, onOCRMatch, paused }: ScannerPr
|
||||
{isSelecting && capturedImage && (
|
||||
<div className="absolute inset-0 z-50 bg-slate-950 flex flex-col">
|
||||
<div className="relative flex-1 bg-black flex items-center justify-center overflow-hidden">
|
||||
<img src={capturedImage} className="max-w-full max-h-full object-contain" id="ocr-canvas-preview" />
|
||||
<img src={capturedImage || undefined} className="max-w-full max-h-full object-contain" id="ocr-canvas-preview" />
|
||||
<div className="absolute inset-0 flex items-center justify-center">
|
||||
<div className="relative" style={{ width: '100%', height: '100%' }}>
|
||||
{detectedWords.map((w, i) => (
|
||||
|
||||
Reference in New Issue
Block a user