From 9d720d31b4581de238cd9e248a67c5be024cf729 Mon Sep 17 00:00:00 2001 From: thislight Date: Mon, 4 Nov 2024 18:21:22 +0800 Subject: [PATCH] ProfileMenuButton: fix the lost profile info --- src/timelines/ProfileMenuButton.tsx | 31 +++++++++++++++++++---------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/src/timelines/ProfileMenuButton.tsx b/src/timelines/ProfileMenuButton.tsx index 6d407f8..0aa088c 100644 --- a/src/timelines/ProfileMenuButton.tsx +++ b/src/timelines/ProfileMenuButton.tsx @@ -25,8 +25,15 @@ import { A } from "@solidjs/router"; const ProfileMenuButton: ParentComponent<{ profile?: { - account: { site: string }; - inf?: { displayName: string; avatar: string; username: string; id: string }; + account: { + site: string; + inf?: { + displayName: string; + avatar: string; + username: string; + id: string; + }; + }; }; onClick?: () => void; onClose?: () => void; @@ -44,6 +51,8 @@ const ProfileMenuButton: ParentComponent<{ props.onClick?.(); }; + const inf = () => props.profile?.account.inf + const onClose = () => { props.onClick?.(); setAnchor(null); @@ -60,8 +69,8 @@ const ProfileMenuButton: ParentComponent<{ aria-expanded={open() ? "true" : undefined} > - + - + Bookmarks - + Likes - +