From 12dd222c405c66a4766320b99f36d4a324a6d284 Mon Sep 17 00:00:00 2001 From: Luc Date: Wed, 6 Sep 2023 15:13:50 +0000 Subject: [PATCH] Introduce Basic Hamburger Menu Upgrades (#41) --- blog/src/components/ClientIcons.ts | 2 +- blog/src/components/navbar/HamburgerMenu.tsx | 51 ++++++-------------- blog/src/components/search/SearchAnchor.tsx | 3 +- 3 files changed, 16 insertions(+), 40 deletions(-) diff --git a/blog/src/components/ClientIcons.ts b/blog/src/components/ClientIcons.ts index b315f08..917dabb 100644 --- a/blog/src/components/ClientIcons.ts +++ b/blog/src/components/ClientIcons.ts @@ -1,3 +1,3 @@ 'use client'; -export { CrossSVG, MagnifyingGlassSVG } from '@ensdomains/thorin'; +export { CrossSVG, MagnifyingGlassSVG, MenuSVG } from '@ensdomains/thorin'; diff --git a/blog/src/components/navbar/HamburgerMenu.tsx b/blog/src/components/navbar/HamburgerMenu.tsx index 4c03ca3..2bb25ce 100644 --- a/blog/src/components/navbar/HamburgerMenu.tsx +++ b/blog/src/components/navbar/HamburgerMenu.tsx @@ -1,11 +1,9 @@ -'use client'; - -import { CrossSVG, MenuSVG } from '@ensdomains/thorin'; -import { FC, useState } from 'react'; -import { FaDiscord, FaMedium, FaYoutube } from 'react-icons/fa'; +import Link from 'next/link'; +import { FC } from 'react'; +import { FaDiscord, FaYoutube } from 'react-icons/fa'; import { FiGithub, FiMessageCircle, FiTwitter } from 'react-icons/fi'; -import { cx } from '../../lib/cx'; +import { CrossSVG, MenuSVG } from '../ClientIcons'; const links = [ { name: 'ENS Manager', to: 'https://app.ens.domains' }, @@ -18,7 +16,6 @@ const socials = [ { icon: , to: 'https://twitter.com/ensdomains' }, { icon: , to: 'https://github.com/ensdomains' }, { icon: , to: 'https://chat.ens.domains' }, - { icon: , to: 'https://medium.com/the-ethereum-name-service' }, { icon: , to: 'https://discuss.ens.domains/', @@ -46,16 +43,16 @@ const Content: FC = () => {
-
+
{socials.map((social) => ( - {social.icon} - + ))}
@@ -63,37 +60,17 @@ const Content: FC = () => { }; export const HamburgerMenu = () => { - const [isOpen, setIsOpen] = useState(false); - return ( - <> +
-
- {isOpen && ( -
-
- -
-
- )} -
-
-
- -
-
+
+
- +
); }; diff --git a/blog/src/components/search/SearchAnchor.tsx b/blog/src/components/search/SearchAnchor.tsx index d350dac..0d670ee 100644 --- a/blog/src/components/search/SearchAnchor.tsx +++ b/blog/src/components/search/SearchAnchor.tsx @@ -9,10 +9,9 @@ export const SearchAnchor = () => { className="group z-30 flex flex-1 justify-between" id="search_system" > -
-
+