From 45bad1219e5d1257d744997c7b619ba584fe1dc6 Mon Sep 17 00:00:00 2001 From: rleed <101502594+rleed@users.noreply.github.com> Date: Tue, 15 Aug 2023 13:54:24 -0400 Subject: [PATCH] Fix link to profile matching current URL, not profile (#395) * break out profile menu and remove top-level href * group the bio hint with the menu * rebase/merge --------- Co-authored-by: rleed --- components/header.js | 99 +++++++++++++++++++----------------- components/header.module.css | 4 ++ 2 files changed, 56 insertions(+), 47 deletions(-) diff --git a/components/header.js b/components/header.js index a3f673a2..3f1f4de0 100644 --- a/components/header.js +++ b/components/header.js @@ -1,3 +1,4 @@ +import Dropdown from 'react-bootstrap/Dropdown' import Navbar from 'react-bootstrap/Navbar' import Nav from 'react-bootstrap/Nav' import Link from 'next/link' @@ -5,7 +6,6 @@ import styles from './header.module.css' import { useRouter } from 'next/router' import Button from 'react-bootstrap/Button' import Container from 'react-bootstrap/Container' -import NavDropdown from 'react-bootstrap/NavDropdown' import Price from './price' import { useMe } from './me' import Head from 'next/head' @@ -73,58 +73,63 @@ function NotificationBell () { ) } +function NavProfileMenu ({ me, dropNavKey }) { + return ( +
+ + + + {`@${me.name}`} + + + + + + profile + {me && !me.bioId && +
+ {' '} +
} +
+ + + bookmarks + + + wallet + + + satistics + + + + referrals + + +
+ + settings + +
+ + signOut({ callbackUrl: '/' })}>logout +
+
+ {!me.bioId && + + {' '} + } +
+ ) +} + function StackerCorner ({ dropNavKey }) { const me = useMe() return (
-
- e.preventDefault()}> - {`@${me.name}`} - - } - align='end' - > - - - profile - {me && !me.bioId && -
- {' '} -
} -
- - - bookmarks - - - wallet - - - satistics - - - - referrals - - -
- - settings - -
- - signOut({ callbackUrl: '/' })}>logout -
- {!me.bioId && - - {' '} - } -
+ diff --git a/components/header.module.css b/components/header.module.css index 6abd5e10..a650a66e 100644 --- a/components/header.module.css +++ b/components/header.module.css @@ -91,4 +91,8 @@ .dropdown>a { padding-left: 0 !important; +} + +.dropdown>button { + padding-left: 0 !important; } \ No newline at end of file