Skip to content

Commit eb4f0c0

Browse files
authored
Merge pull request #7 from prafullnavkar/v2
added name in website
2 parents e54269e + ed977c3 commit eb4f0c0

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

Header.js

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import React from "react";
2+
import { Link } from "react-router-dom";
3+
import headLogo from "../assets/head-logo.png";
4+
import { useLocation } from "react-router-dom";
5+
6+
const Header = () => {
7+
const location = useLocation();
8+
return (
9+
<div className="bg-black flex justify-between py-2 px-2">
10+
<div className="flex justify-center items-center gap-4">
11+
<Link to="/">
12+
<img src={headLogo} alt="img" className="md:w-10 md:h-10 w-10 h-10" />
13+
</Link>
14+
{location.pathname === "/contact" ? (
15+
<Link
16+
to="/"
17+
className="text-white hover:underline pr-3 font-bold text-sm md:text-base"
18+
>
19+
Home
20+
</Link>
21+
) : (
22+
<div className="text-white pr-3 font-bold text-sm md:text-base">
23+
{window.location.host}
24+
</div>
25+
)}
26+
</div>
27+
<div className="flex justify-between items-center">
28+
{/* <Link to='about' className='pr-3 font-bold'>About</Link> */}
29+
<Link
30+
to="contact"
31+
className="pr-3 font-bold text-white text-sm md:text-base"
32+
>
33+
Contact
34+
</Link>
35+
{/* <div className='pr-3 font-bold'><img src={cartLogo} alt='img'className='md:w-10 md:w-10 w-10 h-10'/></div> */}
36+
</div>
37+
</div>
38+
);
39+
};
40+
export default Header;

0 commit comments

Comments
 (0)