feat: optimize scan flow with WebP compression and fix admin metrics visibility
This commit is contained in:
@@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user