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
17 changes: 2 additions & 15 deletions client/src/components/main/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,8 @@ import Image from "next/image";
import Link from "next/link";
import { useState } from "react";

import { useExplosionContext } from "@/contexts/ExplosionContext";

export default function Navbar() {
const [isDropdownOpen, setIsDropdownOpen] = useState(false);
const { triggerExplosionAt } = useExplosionContext();

const navItems = [
{ href: "/", label: "Home" },
Expand All @@ -19,19 +16,11 @@ export default function Navbar() {
{ href: "/artwork", label: "Art Showcase" },
];

const handleNavClick = (e: React.MouseEvent) => {
triggerExplosionAt(e.clientX, e.clientY);
};

return (
<>
<header className="sticky top-0 z-50 flex h-24 w-full items-center border-b-2 border-border/20 border-b-primary bg-landingCard px-20 font-jersey10">
<div className="flex flex-1 items-center">
<Link
href="/"
className="flex items-center gap-3 text-2xl lg:mr-5"
onClick={handleNavClick}
>
<Link href="/" className="flex items-center gap-3 text-2xl lg:mr-5">
<Image
src="/game_dev_club_logo.svg"
alt="logo"
Expand All @@ -55,7 +44,6 @@ export default function Navbar() {
<Link
key={item.href}
href={item.href}
onClick={handleNavClick}
className="whitespace-nowrap text-foreground/90 transition-colors duration-150 hover:text-primary"
>
{item.label}
Expand All @@ -79,8 +67,7 @@ export default function Navbar() {
<Link
key={item.href}
href={item.href}
onClick={(e) => {
handleNavClick(e);
onClick={() => {
setIsDropdownOpen(false);
}}
className="block whitespace-nowrap px-4 py-3 text-lg transition-colors duration-150 hover:bg-accent"
Expand Down
Loading