From 834fac76b97edc7f598f28c7436b5f3340260029 Mon Sep 17 00:00:00 2001 From: Somdev Date: Fri, 31 Jan 2025 11:27:48 +0530 Subject: [PATCH] fixed --- components/search/Search.tsx | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) 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;