ui(header): brand lockup opens the user profile when signed in

This commit is contained in:
SkateSpots 2026-10-30 21:04:47 +07:00
parent c00bffdf78
commit 42f47304dd

View file

@ -619,7 +619,11 @@ export function Layout({ children, noPadding }: LayoutProps) {
<div className="mx-auto flex w-full max-w-[1700px] items-center justify-between h-16 px-4 gap-4 xl:gap-8"> <div className="mx-auto flex w-full max-w-[1700px] items-center justify-between h-16 px-4 gap-4 xl:gap-8">
{/* Brand lockup — `shrink-0` + `whitespace-nowrap` guarantee the {/* Brand lockup — `shrink-0` + `whitespace-nowrap` guarantee the
logo never gets squeezed into (or glowed over by) the nav. */} logo never gets squeezed into (or glowed over by) the nav. */}
<Link to="/" className="flex items-center gap-3 group shrink-0"> <Link
to={user ? `/${nip19.npubEncode(user.pubkey)}` : '/'}
className="flex items-center gap-3 group shrink-0"
title={user ? t('chromeUi.viewMyProfile') : t('nav.map')}
>
<img <img
src="/images/icon-1024.png" src="/images/icon-1024.png"
alt="SkateSpots" alt="SkateSpots"
@ -838,7 +842,12 @@ export function Layout({ children, noPadding }: LayoutProps) {
{/* Mobile Header */} {/* Mobile Header */}
<header className="md:hidden sticky top-0 z-50 border-b border-red-500/30 bg-black/95 backdrop-blur safe-area-top"> <header className="md:hidden sticky top-0 z-50 border-b border-red-500/30 bg-black/95 backdrop-blur safe-area-top">
<div className="flex items-center justify-between h-14 px-3 gap-3"> <div className="flex items-center justify-between h-14 px-3 gap-3">
<Link to="/" className="flex items-center gap-2 touch-manipulation active:opacity-80 flex-1 min-w-0"> <Link
to={user ? `/${nip19.npubEncode(user.pubkey)}` : '/'}
className="flex items-center gap-2 touch-manipulation active:opacity-80 flex-1 min-w-0"
title={user ? t('chromeUi.viewMyProfile') : t('nav.map')}
aria-label={user ? t('chromeUi.viewMyProfile') : t('nav.map')}
>
<img <img
src="/images/icon-1024.png" src="/images/icon-1024.png"
alt="SkateSpots" alt="SkateSpots"