diff --git a/components/search/Search.tsx b/components/search/Search.tsx index f4f941c..afe0f5a 100644 --- a/components/search/Search.tsx +++ b/components/search/Search.tsx @@ -98,16 +98,12 @@ // export default Search; - -import React, { useRef, useEffect, useState } from "react"; +import React, { useRef, useEffect } from "react"; import "./Search.css"; // Import CSS for styling const Search: React.FC = () => { const videoRef = useRef(null); const canvasRef = useRef(null); - const [uploadedFile, setUploadedFile] = useState(null); - - // Automatically opennig the camera when the component mounts useEffect(() => { const openCamera = async () => { try { @@ -149,7 +145,6 @@ const Search: React.FC = () => { const handleFileChange = (event: React.ChangeEvent) => { const file = event.target.files?.[0]; if (file) { - setUploadedFile(file); // Storing the uploaded file in state callApi(file); // Calling the API with the uploaded file } }; @@ -219,5 +214,4 @@ const Search: React.FC = () => { ); }; - export default Search;