import { useRef } from "react"; import { Upload, Camera } from "lucide-react"; interface ImageUploadProps { imagePreviewUrl: string | null; onUploadClick: () => void; onImageSelect: (event: React.ChangeEvent) => void; } export const ImageUpload = ({ imagePreviewUrl, onUploadClick, onImageSelect, }: ImageUploadProps) => { const fileInputRef = useRef(null); return (
(e.key === "Enter" || e.key === " ") && onUploadClick() } role="button" tabIndex={0} aria-label="Upload store logo" > {imagePreviewUrl ? ( Store Logo ) : ( )}
); }; export const ProductImageUpload = ({ imagePreviewUrl, onUploadClick, onImageSelect, }: ImageUploadProps) => { const fileInputRef = useRef(null); return (
(e.key === "Enter" || e.key === " ") && onUploadClick() } role="button" tabIndex={0} aria-label="Upload store logo" > {imagePreviewUrl ? ( Store Logo ) : ( )}
); };