Skip to content

Commit

Permalink
fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
karlavasquez8 committed Apr 19, 2024
1 parent fee5ffb commit 8e329c5
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
20 changes: 18 additions & 2 deletions packages/nextjs/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import React, { useCallback, useRef, useState } from "react";
import { BugAntIcon } from "@heroicons/react/24/outline";
import { useOutsideClick } from "~~/hooks/scaffold-stark";
import { CustomConnectButton } from "~~/components/scaffold-stark/CustomConnectButton";
import Image from "next/image";
import { usePathname } from "next/navigation";

type HeaderMenuLink = {
label: string;
Expand All @@ -30,14 +32,28 @@ export const menuLinks: HeaderMenuLink[] = [
export const Header = () => {
const [isDrawerOpen, setIsDrawerOpen] = useState(false);
const burgerMenuRef = useRef<HTMLDivElement>(null);
const pathname = usePathname();
useOutsideClick(
burgerMenuRef,
useCallback(() => setIsDrawerOpen(false), []),
);

return (
<div className="lg:static top-0 navbar min-h-0 flex-shrink-0 justify-between z-20 px-0 sm:px-2 bg-base-100">
<div className="navbar-end flex-grow mr-4 py-[8px]">
<div
className={`lg:static top-0 navbar min-h-0 flex-shrink-0 justify-between z-20 px-0 sm:px-2 bg-base-100 ${pathname !== "/" ? "border-b border-[#1c2d49]" : ""}`}
>
<div className="pl-8">
{pathname !== "/" && (
<Image
src={"/logo-header.svg"}
alt={"logo header"}
width={200}
height={65}
className="sm:w-[100px]"
/>
)}
</div>
<div className="navbar-end flex-grow pr-8 py-[8px]">
<CustomConnectButton />
</div>
</div>
Expand Down
2 changes: 2 additions & 0 deletions packages/nextjs/public/icon-starknet.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion packages/nextjs/styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
@import "tailwindcss/components";
@import "tailwindcss/utilities";


:root,
[data-theme] {
background: oklch(var(--b2));
Expand Down

0 comments on commit 8e329c5

Please sign in to comment.