feat: optimize scan flow with WebP compression and fix admin metrics visibility

This commit is contained in:
2025-12-22 10:15:29 +01:00
parent f0588418c8
commit 5e35710b67
19 changed files with 477 additions and 332 deletions

View File

@@ -9,7 +9,7 @@ interface BottomNavigationProps {
onShelf?: () => void;
onSearch?: () => void;
onProfile?: () => void;
onScan: (base64: string) => void;
onScan: (file: File) => void;
}
export const BottomNavigation = ({ onHome, onShelf, onSearch, onProfile, onScan }: BottomNavigationProps) => {
@@ -22,11 +22,7 @@ export const BottomNavigation = ({ onHome, onShelf, onSearch, onProfile, onScan
const handleFileChange = (e: React.ChangeEvent<HTMLInputElement>) => {
const file = e.target.files?.[0];
if (file) {
const reader = new FileReader();
reader.onloadend = () => {
onScan(reader.result as string);
};
reader.readAsDataURL(file);
onScan(file);
}
};