From d1c073e33e75acafe1a5a8e401d84f8b77a2ebfd Mon Sep 17 00:00:00 2001 From: thislight Date: Mon, 28 Oct 2024 13:56:04 +0800 Subject: [PATCH] Profile: add loading indicator for toot list --- src/profiles/Profile.tsx | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/profiles/Profile.tsx b/src/profiles/Profile.tsx index e557440..9024820 100644 --- a/src/profiles/Profile.tsx +++ b/src/profiles/Profile.tsx @@ -13,6 +13,7 @@ import { AppBar, Avatar, Button, + CircularProgress, Divider, IconButton, ListItemIcon, @@ -102,7 +103,7 @@ const Profile: Component = () => { const avatarImg = () => profile()?.avatar; const displayName = () => resolveCustomEmoji(profile()?.displayName || "", profile()?.emojis ?? []); - const fullUsername = () => `@${profile()?.acct ?? ""}`; // TODO: full user name + const fullUsername = () => (profile()?.acct ? `@${profile()!.acct!}` : ""); // TODO: full user name const description = () => profile()?.note; css` @@ -231,7 +232,12 @@ const Profile: Component = () => { Mention {profile()?.displayName || ""}... - + @@ -307,6 +313,7 @@ const Profile: Component = () => { createRenderEffect(() => (e.innerHTML = description() || "")) } > + @@ -365,8 +372,11 @@ const Profile: Component = () => { size="large" color="primary" onClick={[refetchRecentToots, "prev"]} + disabled={recentTootChunk.loading} > - + }> + +