-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHeader.js
More file actions
40 lines (39 loc) · 1.29 KB
/
Header.js
File metadata and controls
40 lines (39 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import React from "react";
import { Link } from "react-router-dom";
import headLogo from "../assets/head-logo.png";
import { useLocation } from "react-router-dom";
const Header = () => {
const location = useLocation();
return (
<div className="bg-black flex justify-between py-2 px-2">
<div className="flex justify-center items-center gap-4">
<Link to="/">
<img src={headLogo} alt="img" className="md:w-10 md:h-10 w-10 h-10" />
</Link>
{location.pathname === "/contact" ? (
<Link
to="/"
className="text-white hover:underline pr-3 font-bold text-sm md:text-base"
>
Home
</Link>
) : (
<div className="text-white pr-3 font-bold text-sm md:text-base">
{window.location.host}
</div>
)}
</div>
<div className="flex justify-between items-center">
{/* <Link to='about' className='pr-3 font-bold'>About</Link> */}
<Link
to="contact"
className="pr-3 font-bold text-white text-sm md:text-base"
>
Contact
</Link>
{/* <div className='pr-3 font-bold'><img src={cartLogo} alt='img'className='md:w-10 md:w-10 w-10 h-10'/></div> */}
</div>
</div>
);
};
export default Header;