Skip to content

Commit

Permalink
build: fix navbar logo
Browse files Browse the repository at this point in the history
  • Loading branch information
Ayobami6 committed Oct 28, 2023
1 parent 5681cf6 commit 898f580
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 26 deletions.
46 changes: 23 additions & 23 deletions client/src/components/Navbar/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,30 @@ import Button from '../Button/Button';
import './navbar.css';

const Navbar = () => {
const [show, setShow] = useState(false);
useEffect(() => {
const handleShow = () => {
if (window.scrollY > 100) {
setShow(true);
} else {
setShow(false);
}
};
const [show, setShow] = useState(false);
useEffect(() => {
const handleShow = () => {
if (window.scrollY > 100) {
setShow(true);
} else {
setShow(false);
}
};

window.addEventListener('scroll', handleShow);
return () => {
window.removeEventListener('scroll', handleShow);
};
}, []);
return (
<div className={`nav ${show && 'black'}`}>
{/* <h1 className="logo">Meet Devs</h1> */}
<img src='src/assets/logo.png' alt='logo' width={150} />
<Link to={'/auth'}>
<Button text='Sign In' size='sm' />
</Link>
</div>
);
window.addEventListener('scroll', handleShow);
return () => {
window.removeEventListener('scroll', handleShow);
};
}, []);
return (
<div className={`nav ${show && 'black'}`}>
{/* <h1 className="logo">Meet Devs</h1> */}
<img src='/assets/logo.png' alt='logo' width={150} />
<Link to={'/auth'}>
<Button text='Sign In' size='sm' />
</Link>
</div>
);
};

export default Navbar;
3 changes: 1 addition & 2 deletions client/src/components/Navbar/Navbar2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ const AuthNavbar = () => {
<>
<div className="flex justify-between p-3 px-10 { isAuth ? border-md : '' } ">
<div className='flex gap-10 items-center'>
<img src='src/assets/logo.png' alt='logo' width={160} />
<img src='/assets/logo.png' alt='logo' width={160} />
</div>
<h2>Name</h2>
</div>
</>
);
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Navbar/TalentNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function TalentNav(): JSX.Element {
return (
<div className='talent-nav'>
<div className='nav-con'>
<img className={'rounded-full'} src={'assets/logo.png'} alt='' />
<img className={'rounded-full'} src={'/assets/logo.png'} alt='' />
<nav className='nav-items-con' onClick={() => setOpenProfile(true)}>
{user.data ? (
''
Expand Down

0 comments on commit 898f580

Please sign in to comment.