diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 3e744e9b..b8307351 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1034,7 +1034,6 @@ "version": "6.6.0", "resolved": "https://registry.npmjs.org/@fortawesome/free-brands-svg-icons/-/free-brands-svg-icons-6.6.0.tgz", "integrity": "sha512-1MPD8lMNW/earme4OQi1IFHtmHUwAKgghXlNwWi9GO7QkTfD+IIaYpIai4m2YJEzqfEji3jFHX1DZI5pbY/biQ==", - "license": "(CC-BY-4.0 AND MIT)", "dependencies": { "@fortawesome/fontawesome-common-types": "6.6.0" }, diff --git a/frontend/script.js b/frontend/script.js deleted file mode 100644 index 235c566b..00000000 --- a/frontend/script.js +++ /dev/null @@ -1,12 +0,0 @@ -// Register the service worker -if ('serviceWorker' in navigator) { - window.addEventListener('load', () => { - navigator.serviceWorker.register('/sw.js') // Pointing to the sw.js file - .then(registration => { - console.log('ServiceWorker registration successful:', registration); - }) - .catch(error => { - console.error('ServiceWorker registration failed:', error); - }); - }); -} \ No newline at end of file diff --git a/frontend/sitemap.xml b/frontend/sitemap.xml deleted file mode 100644 index ce545bca..00000000 --- a/frontend/sitemap.xml +++ /dev/null @@ -1,218 +0,0 @@ - - - - https://agro-tech-ai.vercel.app/ - 2024-10-13T20:16:21+01:00 - 0.8 - - - https://agro-tech-ai.vercel.app/crop - 2024-10-13T20:16:21+01:00 - 1.0 - - - https://agro-tech-ai.vercel.app/crop_recommendation - 2024-10-13T20:16:21+01:00 - 1.0 - - - https://agro-tech-ai.vercel.app/prices - 2024-10-13T20:16:21+01:00 - 1.0 - - - https://agro-tech-ai.vercel.app/fertilizer - 2024-10-13T20:16:21+01:00 - 1.0 - - - https://agro-tech-ai.vercel.app/soil - 2024-10-13T20:16:21+01:00 - 1.0 - - - https://agro-tech-ai.vercel.app/Irrigation - 2024-10-13T20:16:21+01:00 - 1.0 - - - https://agro-tech-ai.vercel.app/disease - 2024-10-13T20:16:21+01:00 - 1.0 - - - https://agro-tech-ai.vercel.app/FertilizerRequirementsCalculator - 2024-10-13T20:16:21+01:00 - 1.0 - - - https://agro-tech-ai.vercel.app/WaterRequirementCalculator - 2024-10-13T20:16:21+01:00 - 1.0 - - - https://agro-tech-ai.vercel.app/SoilMoistureCalculator - 2024-10-13T20:16:21+01:00 - 1.0 - - - https://agro-tech-ai.vercel.app/CropYieldCalculator - 2024-10-13T20:16:21+01:00 - 1.0 - - - https://agro-tech-ai.vercel.app/FertilizerCalculator - 2024-10-13T20:16:21+01:00 - 1.0 - - - https://agro-tech-ai.vercel.app/Climate - 2024-10-13T20:16:21+01:00 - 1.0 - - - https://agro-tech-ai.vercel.app/soiltestingcentres - 2024-10-13T20:16:21+01:00 - 1.0 - - - https://agro-tech-ai.vercel.app/PlantTaskReminder - 2024-10-13T20:16:21+01:00 - 1.0 - - - https://agro-tech-ai.vercel.app/CropManagementGuide - 2024-10-13T20:16:21+01:00 - 1.0 - - - https://agro-tech-ai.vercel.app/EcoCropManager - 2024-10-13T20:16:21+01:00 - 1.0 - - - https://agro-tech-ai.vercel.app/TaskReminder - 2024-10-13T20:16:21+01:00 - 1.0 - - - https://agro-tech-ai.vercel.app/CropCalender - 2024-10-13T20:16:21+01:00 - 1.0 - - - https://agro-tech-ai.vercel.app/login - 2024-10-13T20:16:21+01:00 - 1.0 - - - https://agro-tech-ai.vercel.app/DiseaseRecognition - 2024-10-13T20:16:21+01:00 - 1.0 - - - https://agro-tech-ai.vercel.app/article - 2024-10-13T20:16:21+01:00 - 1.0 - - - https://agro-tech-ai.vercel.app/engine - 2024-10-13T20:16:21+01:00 - 1.0 - - - https://agro-tech-ai.vercel.app/products - 2024-10-13T20:16:21+01:00 - 1.0 - - - https://agro-tech-ai.vercel.app/chatbot - 2024-10-13T20:16:21+01:00 - 1.0 - - - https://agro-tech-ai.vercel.app/aboutus - 2024-10-13T20:16:21+01:00 - 1.0 - - - https://agro-tech-ai.vercel.app/contact - 2024-10-13T20:16:21+01:00 - 1.0 - - - https://agro-tech-ai.vercel.app/forecast - 2024-10-13T20:16:21+01:00 - 1.0 - - - https://agro-tech-ai.vercel.app/privacy-policy - 2024-10-13T20:16:21+01:00 - 1.0 - - - https://agro-tech-ai.vercel.app/terms - 2024-10-13T20:16:21+01:00 - 1.0 - - - https://agro-tech-ai.vercel.app/cookie-policy - 2024-10-13T20:16:21+01:00 - 1.0 - - - https://agro-tech-ai.vercel.app/transparent - 2024-10-13T20:16:21+01:00 - 1.0 - - - https://agro-tech-ai.vercel.app/signup - 2024-10-13T20:16:21+01:00 - 1.0 - - - https://agro-tech-ai.vercel.app/thank-you - 2024-10-13T20:16:21+01:00 - 1.0 - - - https://agro-tech-ai.vercel.app/about - 2024-10-13T20:16:21+01:00 - 1.0 - - - https://agro-tech-ai.vercel.app/submit - 2024-10-13T20:16:21+01:00 - 1.0 - - - https://agro-tech-ai.vercel.app/fertilizer_calculator - 2024-10-13T20:16:21+01:00 - 1.0 - - - https://agro-tech-ai.vercel.app/reports - 2024-10-13T20:16:21+01:00 - 1.0 - - - https://agro-tech-ai.vercel.app/SugarcaneRecognition - 2024-10-13T20:16:21+01:00 - 1.0 - - - https://agro-tech-ai.vercel.app/PaddyRecognition - 2024-10-13T20:16:21+01:00 - 1.0 - - - https://agro-tech-ai.vercel.app/Auth-page - 2024-10-13T20:16:21+01:00 - 1.0 - - - https://agro-tech-ai.vercel.app/whyai - 2024-10-13T20:16:21+01:00 - 1.0 - - \ No newline at end of file diff --git a/frontend/src/.env b/frontend/src/.env index d059c4fa..037669cc 100644 --- a/frontend/src/.env +++ b/frontend/src/.env @@ -1 +1,2 @@ REACT_APP_MAPBOX_ACCESS_TOKEN = 'pk.eyJ1IjoiYW5hbmRoYSIsImEiOiJjbTIwN29haWEwYzVrMmpzZ25yeTF4MmN4In0.3fHnwKMxxXNy9pM-Vcn9gw' +VITE_BACKEND_BASE_URL = https://agro-tech-ai-backend-teal.vercel.app/ \ No newline at end of file diff --git a/frontend/src/components/Navbar.jsx b/frontend/src/components/Navbar.jsx index 2089689d..4833f004 100644 --- a/frontend/src/components/Navbar.jsx +++ b/frontend/src/components/Navbar.jsx @@ -90,9 +90,9 @@ const Navbar = () => { )} - `block py-2 px-3 text-white rounded-lg transition-all duration-300 ${isActive ? "bg-green-700" : "hover:bg-green-500"}`} onClick={closeMenu}> + {/* `block py-2 px-3 text-white rounded-lg transition-all duration-300 ${isActive ? "bg-green-700" : "hover:bg-green-500"}`} onClick={closeMenu}> Water Management - + */} {/* Soil & Fertilizer Dropdown */}
handleDropdown("soil")} onMouseLeave={closeMenu}>
)} diff --git a/frontend/src/components/tools/GeminiChat.jsx b/frontend/src/components/tools/GeminiChat.jsx index 96b43509..5ccc1326 100644 --- a/frontend/src/components/tools/GeminiChat.jsx +++ b/frontend/src/components/tools/GeminiChat.jsx @@ -1,7 +1,6 @@ import React, { useEffect, useRef, useState } from 'react'; -import { Container, TextField, Button, Paper, Box, List, ListItem, ListItemText, Divider, IconButton, Stack } from '@mui/material'; -import SendIcon from '@mui/icons-material/Send'; -import ContentCopyIcon from '@mui/icons-material/ContentCopy'; +import { Container, TextField, Button, Paper, Box, List, ListItem, ListItemText, Divider, Stack } from '@mui/material'; +import { FaPaperPlane, FaTrash } from 'react-icons/fa'; import { ToastContainer, toast } from 'react-toastify'; import 'react-toastify/dist/ReactToastify.css'; import { motion } from 'framer-motion'; @@ -26,7 +25,6 @@ const GeminiChat = () => { return
; }; - const handleSubmit = async (e) => { e.preventDefault(); if (!userInput) return; @@ -154,10 +152,21 @@ const GeminiChat = () => { placeholder="Type a message..." style={{ backgroundColor: 'white', borderRadius: '4px' }} /> - - @@ -170,3 +179,5 @@ const GeminiChat = () => { }; export default GeminiChat; + + diff --git a/frontend/sw.js b/frontend/sw.js deleted file mode 100644 index cf61491b..00000000 --- a/frontend/sw.js +++ /dev/null @@ -1,43 +0,0 @@ -const CACHE_NAME = 'my-pwa-cache-v1'; -const urlsToCache = [ - '/', - '/index.html', - '/styles.css', - '/script.js', - '/manifest.json', - '/src/assets/icon-192x192.png', - '/src/assets/icon-512x512.png' -]; - -self.addEventListener('install', (event) => { - event.waitUntil( - caches.open(CACHE_NAME) - .then((cache) => { - return cache.addAll(urlsToCache); - }) - ); -}); - -self.addEventListener('fetch', (event) => { - event.respondWith( - caches.match(event.request) - .then((response) => { - return response || fetch(event.request); - }) - ); -}); - -self.addEventListener('activate', (event) => { - const cacheWhitelist = [CACHE_NAME]; - event.waitUntil( - caches.keys().then((cacheNames) => { - return Promise.all( - cacheNames.map((cacheName) => { - if (!cacheWhitelist.includes(cacheName)) { - return caches.delete(cacheName); - } - }) - ); - }) - ); -}); \ No newline at end of file diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 7003c2ac..00000000 --- a/package-lock.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "AgroTech-AI", - "lockfileVersion": 3, - "requires": true, - "packages": {} -}