Skip to content

Commit

Permalink
login/sign up
Browse files Browse the repository at this point in the history
  • Loading branch information
Ritz7777 committed Sep 18, 2024
1 parent 6b9ee49 commit 665bd8e
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions src/components/Navbar.jsx
Original file line number Diff line number Diff line change
@@ -1,32 +1,37 @@
import { useState } from "react";
import { Link } from "react-router-dom";
import { FaUserCircle } from "react-icons/fa";
import { FaBars, FaTimes } from "react-icons/fa";
import { FaBars, FaTimes } from "react-icons/fa";
import Image from "../Assets/image.png";

const Navbar = () => {
const [isOpen, setIsOpen] = useState(false);
const [isOpen, setIsOpen] = useState(false);

const toggleMenu = () => {
setIsOpen(!isOpen);
};

return (
<div className="relative flex flex-col md:flex-row items-center justify-between px-6 py-4 bg-[#e2e8f0] shadow-lg shadow-slate-500">

<div className="mb-4 md:mb-0">
<Link to="/">
<img src={Image} alt="Logo" className="w-36" />
</Link>
</div>


<div className="md:hidden flex items-center" onClick={toggleMenu}>
{isOpen ? <FaTimes className="text-2xl cursor-pointer" /> : <FaBars className="text-2xl cursor-pointer" />}
{isOpen ? (
<FaTimes className="text-2xl cursor-pointer" />
) : (
<FaBars className="text-2xl cursor-pointer" />
)}
</div>


<div className={`flex-col md:flex-row items-center gap-6 text-lg ${isOpen ? "flex" : "hidden"} md:flex`}>
<div
className={`flex-col md:flex-row items-center gap-6 text-lg ${
isOpen ? "flex" : "hidden"
} md:flex`}
>
<Link
to="/dashboard"
className="text-black hover:text-gray-700 transition duration-300 ease-in-out"
Expand All @@ -37,13 +42,7 @@ const Navbar = () => {
to="/login"
className="bg-blue-500 text-white py-2 px-4 rounded-full hover:bg-blue-600 transition duration-300 ease-in-out"
>
Login
</Link>
<Link
to="/signup"
className="bg-blue-500 text-white py-2 px-4 rounded-full hover:bg-blue-600 transition duration-300 ease-in-out"
>
Sign Up
Login/Sign Up
</Link>

<Link
Expand Down

0 comments on commit 665bd8e

Please sign in to comment.