Skip to content

Commit 17645fc

Browse files
Fix/categories card view (#60)
* fix/categories card section and navigation fixed * fix/commenting unused vars * fix/renaming the navbar and footer to arthritis.lk --------- Co-authored-by: Pawan Senpura <86240715+pawan-live@users.noreply.github.com>
1 parent c675648 commit 17645fc

File tree

3 files changed

+19
-126
lines changed

3 files changed

+19
-126
lines changed

public/arthritis_logo.png

97.8 KB
Loading

src/app/components/Footer.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,14 @@ const Footer = () => {
2222
<div className="container md:hidden flex flex-col mx-auto px-5">
2323
{/* RheumaConnect Brand Name */}
2424
<h3 className="font-bold text-2xl text-black mb-5 text-center">
25-
RheumaConnect
25+
Arthritis.lk
2626
</h3>
2727

2828
{/* Link 1 Dropdown */}
2929
<button
3030
onClick={() => toggleDropdown("link1")}
31-
className="bg-white rounded-lg shadow-md px-5 py-3 text-left text-black mb-3 flex justify-between items-center">
31+
className="bg-white rounded-lg shadow-md px-5 py-3 text-left text-black mb-3 flex justify-between items-center"
32+
>
3233
Link 1
3334
{isOpen.link1 ? (
3435
<ChevronUpIcon className="h-6 w-6 text-gray-500" />
@@ -59,7 +60,8 @@ const Footer = () => {
5960
{/* Link 2 Dropdown */}
6061
<button
6162
onClick={() => toggleDropdown("link2")}
62-
className="bg-white rounded-lg shadow-md px-5 py-3 text-left text-black mb-3 flex justify-between items-center">
63+
className="bg-white rounded-lg shadow-md px-5 py-3 text-left text-black mb-3 flex justify-between items-center"
64+
>
6365
Link 2
6466
{isOpen.link2 ? (
6567
<ChevronUpIcon className="h-6 w-6 text-gray-500" />
@@ -90,7 +92,8 @@ const Footer = () => {
9092
{/* Contact Dropdown */}
9193
<button
9294
onClick={() => toggleDropdown("contact")}
93-
className="bg-white rounded-lg shadow-md px-5 py-3 text-left text-black mb-3 flex justify-between items-center">
95+
className="bg-white rounded-lg shadow-md px-5 py-3 text-left text-black mb-3 flex justify-between items-center"
96+
>
9497
Contact
9598
{isOpen.contact ? (
9699
<ChevronUpIcon className="h-6 w-6 text-gray-500" />
@@ -111,7 +114,7 @@ const Footer = () => {
111114
{/* Desktop View */}
112115
<div className="hidden container md:flex flex-row mx-auto px-10">
113116
<div className="flex flex-col w-6/12">
114-
<h3 className="font-bold text-2xl mb-5">RheumaConnect</h3>
117+
<h3 className="font-bold text-2xl mb-5"> Arthritis.lk</h3>
115118
<p>
116119
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
117120
nisi ut aliquip ex ea commodo consequat.

src/app/components/Navbar/Navbar.tsx

Lines changed: 11 additions & 121 deletions
Original file line numberDiff line numberDiff line change
@@ -2,68 +2,32 @@
22

33
import React, { useState, useRef } from "react";
44
import Link from "next/link";
5+
import Image from "next/image";
56
import { usePathname } from "next/navigation";
67
import { NavbarType } from "@/types/CommonTypes";
7-
8-
// const languages = [
9-
// { label: "English", value: "en" },
10-
// { label: "සිංහල", value: "si" },
11-
// { label: "தமிழ்", value: "ta" },
12-
// ];
8+
import arthritisLogo from "/public/arthritis_logo.png"; // Adjust the path as needed
139

1410
export default function Navbar({ data }: { data: NavbarType }) {
1511
const { link, navbarButton } = data;
1612

1713
const [isOpen, setIsOpen] = useState(false);
18-
// const [isDropdownOpen, setIsDropdownOpen] = useState(false);
19-
// const [selectedLanguage, setSelectedLanguage] = useState("en");
2014
const pathname = usePathname();
2115
const dropdownRef = useRef<HTMLDivElement>(null);
2216

2317
const toggleMenu = () => setIsOpen(!isOpen);
2418
const closeMenu = () => setIsOpen(false);
2519

26-
// const toggleDropdown = () => setIsDropdownOpen(!isDropdownOpen);
27-
// const closeDropdown = () => setIsDropdownOpen(false);
28-
29-
// const handleLanguageSelect = (lang: string) => {
30-
// setSelectedLanguage(lang);
31-
// closeDropdown();
32-
// };
33-
34-
// useEffect(() => {
35-
// const handleClickOutside = (event: MouseEvent) => {
36-
// if (
37-
// dropdownRef.current &&
38-
// !dropdownRef.current.contains(event.target as Node)
39-
// ) {
40-
// closeDropdown();
41-
// }
42-
// };
43-
44-
// const handleEscape = (event: KeyboardEvent) => {
45-
// if (event.key === "Escape") {
46-
// closeDropdown();
47-
// }
48-
// };
49-
50-
// document.addEventListener("mousedown", handleClickOutside);
51-
// document.addEventListener("keydown", handleEscape);
52-
53-
// return () => {
54-
// document.removeEventListener("mousedown", handleClickOutside);
55-
// document.removeEventListener("keydown", handleEscape);
56-
// };
57-
// }, []);
58-
5920
return (
6021
<header className="bg-white shadow sticky top-0 z-50">
6122
<div className="container mx-auto px-4 flex items-center justify-between py-4">
62-
<Link
63-
href="/"
64-
className="text-2xl font-bold text-[#2F7CC4] flex-shrink-0"
65-
>
66-
Rheuma<span className="text-gray-800">Connect</span>
23+
<Link href="/" className="flex-shrink-0">
24+
<Image
25+
src="/arthritis_logo.png"
26+
alt="Arthritis Logo"
27+
width={175} // Adjust the width as neede
28+
height={70}
29+
className="cursor-pointer"
30+
/>
6731
</Link>
6832

6933
<nav className="hidden md:flex items-center gap-x-6">
@@ -87,43 +51,6 @@ export default function Navbar({ data }: { data: NavbarType }) {
8751
{navbarButton?.buttonText}
8852
</button>
8953
</Link>
90-
91-
{/* <div className="relative" ref={dropdownRef}>
92-
<button
93-
onClick={toggleDropdown}
94-
className="bg-white border border-gray-400 text-gray-800 rounded-[10px] text-[14px] font-medium flex items-center justify-center hover:bg-gray-100 transition"
95-
style={{ width: "98px", height: "38px", lineHeight: "18px" }}>
96-
<span>English</span>
97-
<svg
98-
className={`w-4 h-4 text-black transform ${
99-
isDropdownOpen ? "rotate-180" : "rotate-0"
100-
}`}
101-
fill="none"
102-
stroke="currentColor"
103-
strokeWidth="2"
104-
viewBox="0 0 24 24"
105-
xmlns="http://www.w3.org/2000/svg">
106-
<path
107-
strokeLinecap="round"
108-
strokeLinejoin="round"
109-
d="M19 9l-7 7-7-7"
110-
/>
111-
</svg>
112-
</button>
113-
114-
{isDropdownOpen && (
115-
<div className="absolute mt-2 w-40 bg-white border border-gray-200 rounded shadow-lg">
116-
{languages.map(({ label, value }) => (
117-
<button
118-
key={value}
119-
onClick={() => handleLanguageSelect(value)}
120-
className="block w-full text-left px-4 py-2 hover:bg-gray-200 text-gray-800">
121-
{label}
122-
</button>
123-
))}
124-
</div>
125-
)}
126-
</div> */}
12754
</nav>
12855

12956
<button
@@ -196,44 +123,7 @@ export default function Navbar({ data }: { data: NavbarType }) {
196123
</button>
197124
<div className="mt-4">
198125
<div className="relative" ref={dropdownRef}>
199-
{/* <button
200-
onClick={toggleDropdown}
201-
className="px-4 py-2 bg-white border border-gray-300 rounded-full text-sm flex items-center space-x-2 shadow-sm hover:bg-gray-100 transition w-full">
202-
<span className="text-black">
203-
{
204-
languages.find(
205-
(lang) => lang.value === selectedLanguage
206-
)?.label
207-
}
208-
</span>
209-
<svg
210-
className={`w-4 h-4 text-black transform ${
211-
isDropdownOpen ? "rotate-180" : "rotate-0"
212-
}`}
213-
fill="none"
214-
stroke="currentColor"
215-
strokeWidth="2"
216-
viewBox="0 0 24 24"
217-
xmlns="http://www.w3.org/2000/svg">
218-
<path
219-
strokeLinecap="round"
220-
strokeLinejoin="round"
221-
d="M19 9l-7 7-7-7"
222-
/>
223-
</svg>
224-
</button> */}
225-
{/* {isDropdownOpen && (
226-
<div className="absolute mt-2 w-full bg-white border border-gray-200 rounded shadow-lg">
227-
{languages.map(({ label, value }) => (
228-
<button
229-
key={value}
230-
onClick={() => handleLanguageSelect(value)}
231-
className="block w-full text-left px-4 py-2 hover:bg-gray-200 text-gray-800">
232-
{label}
233-
</button>
234-
))}
235-
</div>
236-
)} */}
126+
{/* Language dropdown code here */}
237127
</div>
238128
</div>
239129
</div>

0 commit comments

Comments
 (0)