Skip to content

Commit

Permalink
ok
Browse files Browse the repository at this point in the history
  • Loading branch information
manikumarreddyu committed Nov 18, 2024
1 parent 01640b0 commit aca5dba
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 288 deletions.
1 change: 0 additions & 1 deletion frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions frontend/script.js

This file was deleted.

218 changes: 0 additions & 218 deletions frontend/sitemap.xml

This file was deleted.

1 change: 1 addition & 0 deletions frontend/src/.env
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
REACT_APP_MAPBOX_ACCESS_TOKEN = 'pk.eyJ1IjoiYW5hbmRoYSIsImEiOiJjbTIwN29haWEwYzVrMmpzZ25yeTF4MmN4In0.3fHnwKMxxXNy9pM-Vcn9gw'
VITE_BACKEND_BASE_URL = https://agro-tech-ai-backend-teal.vercel.app/
6 changes: 4 additions & 2 deletions frontend/src/components/Navbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ const Navbar = () => {
</div>
)}
</div>
<NavLink to="/water-management" exact className={({ isActive }) => `block py-2 px-3 text-white rounded-lg transition-all duration-300 ${isActive ? "bg-green-700" : "hover:bg-green-500"}`} onClick={closeMenu}>
{/* <NavLink to="/water-management" exact className={({ isActive }) => `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
</NavLink>
</NavLink> */}
{/* Soil & Fertilizer Dropdown */}
<div className="relative" onMouseEnter={() => handleDropdown("soil")} onMouseLeave={closeMenu}>
<button onClick={() => handleDropdown("soil")} className="flex items-center py-2 px-3 text-white rounded-lg hover:bg-green-500 transition-all duration-300 focus:outline-none" aria-haspopup="true" aria-expanded={openDropdown === "soil" ? "true" : "false"}>
Expand Down Expand Up @@ -122,6 +122,8 @@ const Navbar = () => {
<NavLink to="/PlantTaskReminder" className="block py-2 px-4 hover:bg-gray-200" onClick={closeMenu}>Plant Task Reminder</NavLink>
<NavLink to="/TaskReminder" className="block py-2 px-4 hover:bg-gray-200" onClick={closeMenu}>Plant Task Reminder Advanced</NavLink>
<NavLink to="/GeminiChat" className="block py-2 px-4 hover:bg-gray-200" onClick={closeMenu}>Gemini Chat</NavLink>
<NavLink to="/water-management" className="block py-2 px-4 hover:bg-gray-200" onClick={closeMenu}>Water Management</NavLink>

</div>
)}
</div>
Expand Down
23 changes: 17 additions & 6 deletions frontend/src/components/tools/GeminiChat.jsx
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -26,7 +25,6 @@ const GeminiChat = () => {
return <div dangerouslySetInnerHTML={{ __html: htmlContent }} />;
};


const handleSubmit = async (e) => {
e.preventDefault();
if (!userInput) return;
Expand Down Expand Up @@ -154,10 +152,21 @@ const GeminiChat = () => {
placeholder="Type a message..."
style={{ backgroundColor: 'white', borderRadius: '4px' }}
/>
<Button type="submit" variant="contained" style={{ background: "white", color: "black" }} endIcon={<SendIcon />} onClick={handleSubmit}>
<Button
type="submit"
variant="contained"
style={{ background: "white", color: "black" }}
endIcon={<FaPaperPlane />}
onClick={handleSubmit}
>
Send
</Button>
<Button variant="contained" style={{background:"white",color:"black"}} onClick={handleClearChat}>
<Button
variant="contained"
style={{ background: "white", color: "black" }}
startIcon={<FaTrash />}
onClick={handleClearChat}
>
Clear
</Button>
</Stack>
Expand All @@ -170,3 +179,5 @@ const GeminiChat = () => {
};

export default GeminiChat;


43 changes: 0 additions & 43 deletions frontend/sw.js

This file was deleted.

6 changes: 0 additions & 6 deletions package-lock.json

This file was deleted.

0 comments on commit aca5dba

Please sign in to comment.