File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed
Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change 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 ;
You can’t perform that action at this time.
0 commit comments