collection drawer ui fix
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
*/
|
||||
|
||||
import { useState } from "react";
|
||||
import Image from "next/image";
|
||||
import Link from "next/link";
|
||||
import { usePathname } from "next/navigation";
|
||||
import {
|
||||
@@ -149,6 +150,7 @@ export function SiteSidebar() {
|
||||
authed={!!user}
|
||||
handle={user?.handle ?? null}
|
||||
name={user?.name ?? null}
|
||||
avatarURL={user?.avatar_url ?? null}
|
||||
active={pathname.startsWith("/u/me")}
|
||||
expandedOverride={readingOpen}
|
||||
/>
|
||||
@@ -242,12 +244,17 @@ function SidebarProfile({
|
||||
authed,
|
||||
handle,
|
||||
name,
|
||||
avatarURL,
|
||||
active,
|
||||
expandedOverride,
|
||||
}: {
|
||||
authed: boolean;
|
||||
handle: string | null;
|
||||
name: string | null;
|
||||
/** Uploaded avatar URL — when set, the rail glyph becomes a small
|
||||
* circular picture instead of the generic person icon so the user
|
||||
* recognises their seat in the nav at a glance. */
|
||||
avatarURL?: string | null;
|
||||
active: boolean;
|
||||
expandedOverride?: boolean;
|
||||
}) {
|
||||
@@ -289,7 +296,18 @@ function SidebarProfile({
|
||||
: "text-muted-foreground hover:text-foreground hover:bg-muted",
|
||||
)}
|
||||
>
|
||||
<UserIcon className="size-5 shrink-0" />
|
||||
{avatarURL ? (
|
||||
<Image
|
||||
src={avatarURL}
|
||||
alt=""
|
||||
width={20}
|
||||
height={20}
|
||||
className="size-5 rounded-full object-cover ring-1 ring-foreground/10 shrink-0"
|
||||
unoptimized
|
||||
/>
|
||||
) : (
|
||||
<UserIcon className="size-5 shrink-0" />
|
||||
)}
|
||||
<span
|
||||
className={cn(
|
||||
"min-w-0 truncate transition-opacity duration-150",
|
||||
|
||||
Reference in New Issue
Block a user