From c4b5d31a35d276c49c3d6f127bbf4a571a0ac4a0 Mon Sep 17 00:00:00 2001 From: Kanha Tiwari Date: Fri, 3 Feb 2023 23:34:00 +0530 Subject: [PATCH] UI changes and enhancement --- client/public/index.html | 2 +- client/src/Components/EventCard.jsx | 19 ++++++++----- client/src/Components/EventDashboard.jsx | 0 client/src/Components/EventList.jsx | 2 +- client/src/Components/Navbar.jsx | 34 +++++++++++++++++++++++- client/src/Components/ProfileCard.jsx | 22 +++++++++++++++ server/README.md | 1 + 7 files changed, 70 insertions(+), 10 deletions(-) create mode 100644 client/src/Components/EventDashboard.jsx create mode 100644 client/src/Components/ProfileCard.jsx create mode 100644 server/README.md diff --git a/client/public/index.html b/client/public/index.html index 1e86b17..0c44cd4 100644 --- a/client/public/index.html +++ b/client/public/index.html @@ -39,6 +39,6 @@ To begin the development, run `npm start` or `yarn start`. To create a production bundle, use `npm run build` or `yarn build`. --> - + diff --git a/client/src/Components/EventCard.jsx b/client/src/Components/EventCard.jsx index 7fb0a96..0c88a48 100644 --- a/client/src/Components/EventCard.jsx +++ b/client/src/Components/EventCard.jsx @@ -1,5 +1,7 @@ import React from "react"; +import { Link } from "react-router-dom"; +import { Image } from "semantic-ui-react"; export const EventCard = ({ name, desc }) => { return (
{ style={{ width: "400px" }} > - @@ -19,12 +21,15 @@ export const EventCard = ({ name, desc }) => { {name} -

{desc}

- + {desc} +

+ + - Read more + view -
+
); diff --git a/client/src/Components/EventDashboard.jsx b/client/src/Components/EventDashboard.jsx new file mode 100644 index 0000000..e69de29 diff --git a/client/src/Components/EventList.jsx b/client/src/Components/EventList.jsx index 7b851fb..e700bb7 100644 --- a/client/src/Components/EventList.jsx +++ b/client/src/Components/EventList.jsx @@ -200,7 +200,7 @@ export const EventList = () => { -
+
{currentList.map((data, idx) => { return ; })} diff --git a/client/src/Components/Navbar.jsx b/client/src/Components/Navbar.jsx index 4031ed9..a414764 100644 --- a/client/src/Components/Navbar.jsx +++ b/client/src/Components/Navbar.jsx @@ -1,4 +1,4 @@ -import React from "react"; +import React, { useState } from "react"; import { Fragment } from "react"; import { LogOutUser } from "../api/auth"; import { Disclosure, Menu, Transition } from "@headlessui/react"; @@ -6,6 +6,9 @@ import { useDispatch } from "react-redux"; import { Link, useNavigate } from "react-router-dom"; import { Bars3Icon, BellIcon, XMarkIcon } from "@heroicons/react/24/outline"; import logo from "../Images/Bill.png"; +import { Modal } from "flowbite-react"; +import { Button } from "semantic-ui-react"; +import EventForm from "./EventForm"; const user = { name: "John Doe", email: "john@example.com", @@ -29,9 +32,11 @@ function classNames(...classes) { export const Navbar = () => { const dispatch = useDispatch(); const navigate = useNavigate(); + const [flag, setFlag] = useState(false); const LogoutHandler = async () => { await LogOutUser(dispatch, navigate); }; + const [openForm, setOpenForm] = useState(false); return ( {({ open }) => ( @@ -102,6 +107,9 @@ export const Navbar = () => { if (item.name === "Sign out") { LogoutHandler(); } + if (item.name === "Your Profile") { + setOpenForm(true); + } }} className={classNames( active ? "bg-gray-100" : "", @@ -186,6 +194,9 @@ export const Navbar = () => { if (item.name === "Sign out") { LogoutHandler(); } + if (item.name === "Your Profile") { + setOpenForm(true); + } }} className="block rounded-md px-3 py-2 text-base font-medium text-gray-400 hover:bg-gray-700 hover:text-white" > @@ -195,6 +206,27 @@ export const Navbar = () => {
+ + setOpenForm(false)} + > + Profile + + + + + + + + )} diff --git a/client/src/Components/ProfileCard.jsx b/client/src/Components/ProfileCard.jsx new file mode 100644 index 0000000..06a5909 --- /dev/null +++ b/client/src/Components/ProfileCard.jsx @@ -0,0 +1,22 @@ +import React from "react"; +import { Tabs } from "flowbite-react"; + +const ProfileCard = () => { + return ( + <> + + Profile content + + Dashboard content + + Settings content + Contacts content + + Disabled content + + + + ); +}; + +export default ProfileCard; diff --git a/server/README.md b/server/README.md new file mode 100644 index 0000000..81c1d03 --- /dev/null +++ b/server/README.md @@ -0,0 +1 @@ +# Backend of the application