diff --git a/components/Intro.jsx b/components/Intro.jsx index 99c5a29..6a76c9f 100644 --- a/components/Intro.jsx +++ b/components/Intro.jsx @@ -55,131 +55,149 @@ export default function Intro() { return ( <> -
-
- - To Choose Right Jobs.{" "} - JobSewa is for You{" "} - - - +
+ - Thousands of people search for jobs daily on job portals on average. - -
-
- - setSearch(e.target.value)} - onKeyPress={handleKeyPress} - value={search} - type="text" - placeholder="Search Jobs with Job Categories like electrician ..." - className="flex-1 bg-transparent text-base outline-none" - /> - {search && ( - - )} -
- -
-
-
- -

Suggest Tag:

-
- {/* Tags */} - {["Electrician", "Labourer", "Driver", "Plumber"].map((tag) => ( - onTagClick(tag)} - > - {tag} + Find Your Perfect Job with{" "} + + JobSewa - ))} -
-
- - no-image-found - -
- {doneSearch && ( -
- {Array.isArray(filterJobs) && filterJobs.length > 0 ? ( - filterJobs.map((job) => ) - ) : ( -

- Sorry, no such category job available right now. -

- )} + + + + Connecting thousands of job seekers with their dream careers daily. + + + +
+
+ + setSearch(e.target.value)} + onKeyPress={handleKeyPress} + value={search} + type="text" + placeholder="Search job categories (e.g., electrician)" + className="w-full pl-12 pr-4 py-3 rounded-lg bg-gray-100 focus:outline-none focus:ring-2 focus:ring-sky-600 transition duration-300" + /> + {search && ( + + )} +
+ + Search + +
+
+ + + Popular Tags: + {["Electrician", "Labourer", "Driver", "Plumber"].map((tag) => ( + onTagClick(tag)} + > + {tag} + + ))} + +
- )} - {/* Footer Component */} + + {doneSearch && ( + +
+

+ Search Results +

+
+ {Array.isArray(filterJobs) && filterJobs.length > 0 ? ( + filterJobs.map((job) => ( + + + + )) + ) : ( +

+ Sorry, no jobs found in this category at the moment. +

+ )} +
+
+
+ )} + + {/* Footer Component */} + + + +
+ + + ); } diff --git a/components/NavBar.jsx b/components/NavBar.jsx index d5b718a..78a84b9 100644 --- a/components/NavBar.jsx +++ b/components/NavBar.jsx @@ -87,8 +87,8 @@ export default function NavBar() { <>

@@ -98,8 +98,6 @@ export default function NavBar() { > JobSewa Logo - -

@@ -115,78 +113,26 @@ export default function NavBar() { - {item.label} + + {item.label} + + ))}
-{/* //if you want in older format -
- - Home - - - Post Jobs - - - View Jobs - - - Posted Jobs - - - Dashboard - - - Organizations - -
*/} -
{user !== null ? ( <> @@ -200,23 +146,49 @@ export default function NavBar() {
- Log in + + Log in + + - SIGN IN + + SIGN IN + +
)}
-
+
setIsOpen((state) => !state)} />
@@ -224,23 +196,47 @@ export default function NavBar() { {isOpen && (
setIsOpen(false)} - className={`px-3 m-4 text-base font-medium transition-all duration-700 hover:translate-y-2 uppercase ${ - router.pathname === "/" ? "text-sky-100 font-bold border-b-4 border-sky-500" : "" - }`} + className={` + px-3 m-4 text-base font-medium uppercase text-black + relative overflow-hidden group + transition-all duration-300 ease-in-out + ${router.pathname === "/" ? "text-sky-500 font-bold" : ""} + `} > - Home + + Home + + {openJobs && ( @@ -248,67 +244,112 @@ export default function NavBar() { setIsOpen(false)} - className={`px-3 m-4 text-base font-medium transition-all duration-700 hover:translate-y-2 uppercase ${ - router.pathname === "/frontend/displayJobs" - ? " text-sky-100 font-bold border-b-4 border-sky-500" - : "" - }`} + className={` + px-3 m-4 text-base font-medium uppercase text-black + relative overflow-hidden group + transition-all duration-300 ease-in-out + ${router.pathname === "/frontend/displayJobs" ? "text-sky-500 font-bold" : ""} + `} > - View Jobs + + View Jobs + + setIsOpen(false)} - className={`px-3 m-4 text-base font-medium transition-all duration-700 hover:translate-y-2 uppercase ${ - router.pathname === "/frontend/postAJob" - ? "text-sky-100 font-bold border-b-4 border-sky-500" - : "" - }`} + className={` + px-3 m-4 text-base font-medium uppercase text-black + relative overflow-hidden group + transition-all duration-300 ease-in-out + ${router.pathname === "/frontend/postAJob" ? "text-sky-500 font-bold" : ""} + `} > - Post Jobs + + Post Jobs + + setIsOpen(false)} - className={`px-3 m-4 text-base font-medium transition-all duration-700 hover:translate-y-2 uppercase ${ - router.pathname === "/frontend/postedJob" - ? "text-sky-100 font-bold border-b-4 border-sky-500" - : "" - }`} + className={` + px-3 m-4 text-base font-medium uppercase text-black + relative overflow-hidden group + transition-all duration-300 ease-in-out + ${router.pathname === "/frontend/postedJob" ? "text-sky-500 font-bold" : ""} + `} > - Posted Jobs + + Posted Jobs + + )} setIsOpen(false)} - className={`px-3 m-4 text-base font-medium transition-all duration-700 hover:translate-y-2 uppercase ${ - router.pathname === "/frontend/dashboard" - ? "text-sky-100 font-bold border-b-4 border-sky-500" - : "" - }`} + className={` + px-3 m-4 text-base font-medium uppercase text-black + relative overflow-hidden group + transition-all duration-300 ease-in-out + ${router.pathname === "/frontend/dashboard" ? "text-sky-500 font-bold" : ""} + `} > - Dashboard + + Dashboard + + setIsOpen(false)} - className={`px-3 m-4 text-base font-medium transition-all duration-700 hover:translate-y-2 uppercase ${ - router.pathname === "/frontend/organizations" - ? "text-sky-100 font-bold border-b-4 border-sky-500" - : "" - }`} + className={` + px-3 m-4 text-base font-medium uppercase text-black + relative overflow-hidden group + transition-all duration-300 ease-in-out + ${router.pathname === "/frontend/organizations" ? "text-sky-500 font-bold" : ""} + `} > - Organizations + + Organizations + +
-
+
{user !== null ? ( <>

{user?.name}

@@ -316,15 +357,41 @@ export default function NavBar() { <> - Log in + + Log in + + - SIGN IN + + SIGN IN + + )} @@ -335,316 +402,3 @@ export default function NavBar() { ); } - -// import React, { useState, useEffect } from "react"; -// import Link from "next/link"; -// import { useDispatch, useSelector } from "react-redux"; -// import { BiLogOut } from "react-icons/bi"; -// import Cookies from "js-cookie"; -// import { useRouter } from "next/router"; -// import { GiHamburgerMenu } from "react-icons/gi"; -// import { setUserData } from "@/Utils/UserSlice"; -// import { AiFillCaretDown, AiFillCaretUp } from "react-icons/ai"; - -// export default function NavBar() { -// const dispatch = useDispatch(); -// const router = useRouter(); // useRouter to get current path - -// const [openJobs, setOpenJobs] = useState(false); - -// useEffect(() => { -// dispatch( -// setUserData( -// localStorage.getItem("user") -// ? JSON.parse(localStorage.getItem("user")) -// : null -// ) -// ); -// }, [dispatch]); - -// const user = useSelector((state) => state.User.userData); -// const [isOpen, setIsOpen] = useState(false); -// const [scrolled, isScrolled] = useState(false); -// const hamburgerRef = React.useRef(null); - -// const useOutsideClick = (callback, exceptions) => { -// const ref = React.useRef(); - -// React.useEffect(() => { -// const handleClick = (event) => { -// if (ref.current && -// !ref.current.contains(event.target) && -// !exceptions.some((exception) => exception.current.contains(event.target)) -// ) { -// callback(); -// } -// }; - -// document.addEventListener("click", handleClick, true); - -// return () => { -// document.removeEventListener("click", handleClick, true); -// }; -// }, [ref, exceptions]); - -// return ref; -// }; - -// useEffect(() => { -// window.addEventListener("scroll", () => { -// if (window.scrollY > 20) { -// isScrolled(true); -// } else { -// isScrolled(false); -// } -// }); -// return () => { -// window.removeEventListener("scroll", () => { -// if (window.scrollY > 20) { -// isScrolled(true); -// } else { -// isScrolled(false); -// } -// }); -// }; -// }, [scrolled]); - -// const handleLogout = async () => { -// Cookies.remove("token"); -// localStorage.removeItem("user"); -// router.reload(); -// }; - -// const handleClickOutside = () => { -// setIsOpen(false); -// }; - -// const ref = useOutsideClick(handleClickOutside, [hamburgerRef]); - -// return ( -// <> -//
-//
-//

-// -// 𝓙ob𝓢𝓮𝔀𝓪 -// -//

-//
- -//
-// -// Home -// -// -// Post Jobs -// -// -// View Jobs -// -// -// Posted Jobs -// -// -// Dashboard -// -// -// Organizations -// -//
- -//
-// {user !== null ? ( -// <> -// -//

{user?.name}

-// -// ) : ( -// <> -// -// Login -// -// -// REGISTER -// -// -// )} -//
- -//
-// setIsOpen((state) => !state)} -// /> -//
- -// {isOpen && ( -//
-//
-// setIsOpen(false)} -// className={`px-3 m-4 text-base font-medium transition-all duration-700 hover:translate-y-2 uppercase ${ -// router.pathname === "/" ? "text-sky-200 font-bold" : "" -// }`} -// > -// Home -// -// - -// {openJobs && ( -// <> -// setIsOpen(false)} -// className={`px-3 m-4 text-base font-medium transition-all duration-700 hover:translate-y-2 uppercase ${ -// router.pathname === "/frontend/displayJobs" -// ? "text-sky-200 font-bold" -// : "" -// }`} -// > -// View Jobs -// -// setIsOpen(false)} -// className={`px-3 m-4 text-base font-medium transition-all duration-700 hover:translate-y-2 uppercase ${ -// router.pathname === "/frontend/postAJob" -// ? "text-sky-200 font-bold" -// : "" -// }`} -// > -// Post Jobs -// -// setIsOpen(false)} -// className={`px-3 m-4 text-base font-medium transition-all duration-700 hover:translate-y-2 uppercase ${ -// router.pathname === "/frontend/postedJob" -// ? "text-sky-200 font-bold" -// : "" -// }`} -// > -// Posted Jobs -// -// -// )} -// setIsOpen(false)} -// className={`px-3 m-4 text-base font-medium transition-all duration-700 hover:translate-y-2 uppercase ${ -// router.pathname === "/frontend/dashboard" -// ? "text-sky-200 font-bold" -// : "" -// }`} -// > -// Dashboard -// -// setIsOpen(false)} -// className={`px-3 m-4 text-base font-medium transition-all duration-700 hover:translate-y-2 uppercase ${ -// router.pathname === "/frontend/organizations" -// ? "text-sky-200 font-bold" -// : "" -// }`} -// > -// Organizations -// -//
-//
-// {user !== null ? ( -// <> -// -//

{user?.name}

-// -// ) : ( -// <> -// -// Login -// -// -// REGISTER -// -// -// )} -//
-//
-// )} -//
-// -// ); -// } diff --git a/components/NgoCard.jsx b/components/NgoCard.jsx index aff9f4d..bce9d8a 100644 --- a/components/NgoCard.jsx +++ b/components/NgoCard.jsx @@ -27,10 +27,10 @@ const NgosCard = ({ data }) => { }} className="w-full md:w-[420px] m-2" > - -
+ +
-
+
{data.name} { />
-

+

{data.name}

- + {data.category}
- -
+ +
{isExpanded ? data.description : `${data.description.substring(0, 200)}`} {data.description.length > 150 && ( <> {!isExpanded && "..."} @@ -64,21 +64,8 @@ const NgosCard = ({ data }) => {
- {/*
-//
-// -//

Salary :

-//

10$ / month

-//
-//
-// -//

Deadline :

-//

-// {new Date(Date.now()).toLocaleDateString("en-GB")} -//

-//
-//
*/} - + + { >