From f2300f410cd50548ee9fc851ee3cb912e7b4671d Mon Sep 17 00:00:00 2001 From: MOHAMMED-IQRAMUL Date: Wed, 2 Oct 2024 12:04:55 +0530 Subject: [PATCH] adding new code on dashboard, added left side bar components --- app/components/LeftSideBar.js | 107 +++- app/dashboard/page.js | 192 ++++--- package-lock.json | 941 +++++++++++++++++++++++++++++++++- package.json | 8 +- 4 files changed, 1139 insertions(+), 109 deletions(-) diff --git a/app/components/LeftSideBar.js b/app/components/LeftSideBar.js index 434c4cb..db7af81 100644 --- a/app/components/LeftSideBar.js +++ b/app/components/LeftSideBar.js @@ -1,11 +1,104 @@ -import React from 'react' +import React from "react"; +import { ResizableBox } from "react-resizable"; +import ContentIcon from "@mui/icons-material/Share"; +import DiscussionsIcon from "@mui/icons-material/Forum"; +import InquireIcon from "@mui/icons-material/HelpOutline"; +import LearningIcon from "@mui/icons-material/School"; +import SupportIcon from "@mui/icons-material/SupportAgent"; +import SeasonIcon from "@mui/icons-material/CalendarToday"; +import ProfilesIcon from "@mui/icons-material/Person"; +import WeatherIcon from "@mui/icons-material/WbSunny"; +import Aboutus from "@mui/icons-material/Info"; +import Contactus from "@mui/icons-material/ContactMail"; +import FAQIcon from "@mui/icons-material/QuestionAnswer"; +import PrivacyIcon from "@mui/icons-material/PrivacyTip"; +import TermsIcon from "@mui/icons-material/Gavel"; + const LeftSideBar = () => { + + const NavItems = [ + { name: "Content Sharing", url: "/ContentSharing", icon: ContentIcon }, + { name: "Discussions", url: "/Discussions", icon: DiscussionsIcon }, + { name: "Inquire About Crops", url: "/InquireAboutCrops", icon: InquireIcon }, + { name: "Learning And Resources", url: "/LearningAndResources", icon: LearningIcon }, + { name: "Personal AI Support Bot", url: "/PersonalAiSupportBot", icon: SupportIcon }, + { name: "Season Dashboard", url: "/SeasonDashboard", icon: SeasonIcon }, + { name: "User Profiles", url: "/UserProfiles", icon: ProfilesIcon }, + { name: "Weather Dashboard", url: "/WeatherDashboard", icon: WeatherIcon } + ]; + const NavItemsExt = [ + { name: "About US", url: "/aboutus", icon: Aboutus }, + { name: "Contact US", url: "/contactus", icon: Contactus }, + { name: "FAQ", url: "/faq", icon: FAQIcon }, + { name: "Privacy and Policy", url: "/privacy", icon: PrivacyIcon }, + { name: "Terms and Services", url: "/terms", icon: TermsIcon } + ]; + + + + + return ( -
- -
- ) -} + +
+ + +

Menu

+ + {/* */} + +

Navigation

+ +

External Links

+ +
+
+ ); +}; -export default LeftSideBar +export default LeftSideBar; diff --git a/app/dashboard/page.js b/app/dashboard/page.js index edbd522..ad9001e 100644 --- a/app/dashboard/page.js +++ b/app/dashboard/page.js @@ -1,89 +1,125 @@ -"use client" +"use client"; - -import { useState } from 'react'; -import { SunIcon, CloudIcon, UserIcon, ChatIcon, BookOpenIcon } from '@heroicons/react/outline'; -import Navbar from '../components/Navbar'; -import Footer from '../components/Footer'; +import { + SunIcon, + CloudIcon, + UserIcon, + ChatIcon, + BookOpenIcon, +} from "@heroicons/react/outline"; +import Navbar from "../components/Navbar"; +import Footer from "../components/Footer"; + import 'react-resizable/css/styles.css'; +import LeftSideBar from "../components/LeftSideBar"; export default function Dashboard() { - const [weather, setWeather] = useState(null); - return ( - <> + +const CardItems = [ + { name: "Content Sharing", url: "/ContentSharing" }, + { name: "Discussions", url: "/Discussions" }, + { name: "Inquire About Crops", url: "/InquireAboutCrops" }, + { name: "Learning And Resources", url: "/LearningAndResources" }, + { name: "Personal AI Support Bot", url: "/PersonalAiSupportBot" }, + { name: "Season Dashboard", url: "/SeasonDashboard" }, + { name: "User Profiles", url: "/UserProfiles" }, + { name: "Weather Dashboard", url: "/WeatherDashboard" } +]; + +const ExtraCardItems = [ + { name: "About US", url: "/aboutus" }, + { name: "Contact US", url: "/contactus" }, + { name: "FAQ", url: "/faq" }, + { name: "Privacy and Policy", url: "/privacy" }, + { name: "Terms and Services", url: "/terms" } +]; + +return ( + <>
- -
-
-
-
-

Welcome to FarmRuler Dashboard

-
-
- -
-

Weather Dashboard

-

Check the weather conditions in specific regions.

-
-
-
- -
-

Season Dashboard

-

Get insights on different seasons and their impact on crops.

-
-
-
- -
-

Inquire About Crops

-

Ask questions and get answers about various crops.

-
-
-
- -
-

Personal AI Support Bot

-

Get personalized support from our AI bot.

+ +
+ +
+
+

+ Welcome to FarmRuler Dashboard +

+
+
+ +
+

Weather Dashboard

+

Check the weather conditions in specific regions.

+
+
+
+ +
+

Season Dashboard

+

+ Get insights on different seasons and their impact on + crops. +

+
+
+
+ +
+

+ Inquire About Crops +

+

Ask questions and get answers about various crops.

+
+
+
+ +
+

+ Personal AI Support Bot +

+

Get personalized support from our AI bot.

+
+
+
+ +
+

User Profiles

+

Manage your profile and settings.

+
+
+
+ +
+

Discussions

+

Join discussions with other farmers and experts.

+
+
+
+ +
+

Content Sharing

+

Share and access valuable content.

+
+
+
+ +
+

+ Learning and Resources +

+

Access learning materials and resources.

+
+
-
-
- -
-

User Profiles

-

Manage your profile and settings.

-
-
-
- -
-

Discussions

-

Join discussions with other farmers and experts.

-
-
-
- -
-

Content Sharing

-

Share and access valuable content.

-
-
-
- -
-

Learning and Resources

-

Access learning materials and resources.

-
-
+
- -
-
+ +