Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions src/components/shared/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,17 @@ function HomeContainer({ className, ...props }) {
}

function Home({ large = false, className, ...props }) {
const pathname = usePathname()

function handleClick(e) {
if (pathname === '/') {
e.preventDefault()
window.scrollTo({
top: 0,
behavior: 'smooth',
})
}
}
return (
<Link
href="/"
Expand Down Expand Up @@ -378,11 +389,9 @@ export function Header() {
>
<div className="relative flex gap-4">
<div className="flex flex-1">
{!isHomePage && (
<HomeContainer>
<Home />
</HomeContainer>
)}
</div>
<div className="flex flex-1 justify-end md:justify-center">
<MobileNavigation className="pointer-events-auto md:hidden" />
Expand Down