Skip to content

Commit

Permalink
adhoc
Browse files Browse the repository at this point in the history
  • Loading branch information
Yorichi07 committed Dec 21, 2024
1 parent f86f2ac commit ea9d757
Show file tree
Hide file tree
Showing 10 changed files with 732 additions and 243 deletions.
4 changes: 2 additions & 2 deletions src/Shared.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
faCalendarCheck,
faUser,
faHouse,
faFileMedical,
faChevronLeft,
faDownload,
faUserDoctor,
Expand All @@ -23,6 +22,7 @@ import {
faEyeSlash,
faPenToSquare,
faXmark,
faFilePrescription,
} from "@fortawesome/free-solid-svg-icons";
import { MdEmergency } from "react-icons/md";
import { FaAmbulance } from "react-icons/fa";
Expand All @@ -32,7 +32,7 @@ const Shared = {
calendarCheck: <FontAwesomeIcon icon={faCalendarCheck} />,
User: <FontAwesomeIcon icon={faUser} />,
HomeUser: <FontAwesomeIcon icon={faHouse} />,
Prescription: <FontAwesomeIcon icon={faFileMedical} />,
Prescription: <FontAwesomeIcon icon={faFilePrescription} />,
ArrowLeft: <FontAwesomeIcon icon={faChevronLeft} />,
Download: <FontAwesomeIcon icon={faDownload} />,
DoctorHome: <FontAwesomeIcon icon={faUserDoctor} />,
Expand Down
35 changes: 17 additions & 18 deletions src/components/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,23 @@ const Navbar = ({
}: {
props: {
title: string;
titleLogo: JSX.Element | string |false ;
titleLogo: JSX.Element | string | false;
additionalLogo: JSX.Element | undefined;
menu: boolean | undefined;
role: string | null;
prevRef :string | null;
prevRef: string | null;
};
}) => {
const navigate = useNavigate();
const [navPageBack,setNavPageBack] = useState("");
const [navPageBack, setNavPageBack] = useState("");
const navigateTo = (path: string) => {
navigate(path);
};

useEffect(()=>{
if (props.prevRef !== null) setNavPageBack(props.prevRef)
else setNavPageBack(`/${props.role}-dashboard`)
})
useEffect(() => {
if (props.prevRef !== null) setNavPageBack(props.prevRef);
else setNavPageBack(`/${props.role}-dashboard`);
});

const handleLogout = () => {
localStorage.clear();
Expand All @@ -40,16 +40,15 @@ const Navbar = ({

return (
<div className="bg-white shadow-md p-4 flex items-center justify-between h-[8svh] border-b border border-[gray] max-lg:h-[7svh]">
<span className="flex items-center justify-center gap-2">

<img
src="/upes-logo.jpg"
alt="UPES Logo"
className="w-[100px] max-lg:w-[80px]"
<span className="flex items-center justify-center">
<img
src="/upes-logo.jpg"
alt="UPES Logo"
className="w-[100px] max-lg:w-[80px]"
/>
<p className="font-medium text-3xl max-lg:text-xl">UHS</p>
</span>
<div className="capitalize font-semibold text-2xl max-lg:text-xl flex gap-2 items-baseline">
<p className="font-mono text-3xl max-lg:text-2xl">|UHS</p>
</span>
<div className="capitalize font-semibold text-2xl max-lg:text-xl flex gap-2 items-baseline max-lg:hidden">
{props.titleLogo &&
(typeof props.titleLogo === "string" ? (
<img src={props.titleLogo} alt="Title Logo" className="w-8" />
Expand All @@ -60,7 +59,7 @@ const Navbar = ({
</div>
{props.additionalLogo && props.menu ? (
<Popover>
<PopoverTrigger className="text-2xl max-lg:text-lg min-lg:w-[100px] max-lg:w-[60px] flex items-center justify-end">
<PopoverTrigger className="text-2xl max-lg:text-lg lg:w-[165px] flex items-center justify-end">
{props.additionalLogo}
</PopoverTrigger>
<PopoverContent className="space-y-2 p-2 max-lg:p-2">
Expand Down Expand Up @@ -97,7 +96,7 @@ const Navbar = ({
) : (
<Link
to={navPageBack}
className="text-base max-lg:text-sm flex items-center justify-end min-lg:w-[100px] w-[32px]"
className="text-base max-lg:text-sm flex items-center justify-end lg:w-[165px]"
>
{props.additionalLogo}
</Link>
Expand Down
Loading

0 comments on commit ea9d757

Please sign in to comment.