Skip to content

Commit

Permalink
feat: add summary skeleton
Browse files Browse the repository at this point in the history
  • Loading branch information
Innei committed Jul 16, 2023
1 parent c399c85 commit 1fed006
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/components/widgets/xlog/XLogSummary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,15 @@ const XLogSummary: FC<{

<AutoResizeHeight duration={0.3}>
<p className="text-base-content/85 !m-0 text-sm leading-loose">
{isLoading ? '加载中...' : error ? '请求错误' : data?.data}
{isLoading ? (
<div className="space-y-2">
<span className="block h-5 w-full animate-pulse rounded-xl bg-zinc-200 dark:bg-neutral-800" />
<span className="block h-5 w-full animate-pulse rounded-xl bg-zinc-200 dark:bg-neutral-800" />
<span className="block h-5 w-full animate-pulse rounded-xl bg-zinc-200 dark:bg-neutral-800" />
</div>
) : (
data?.data
)}
</p>
{isLoading && (
<p className="border-slate-200 text-right text-sm dark:border-slate-800 ">
Expand All @@ -60,9 +68,8 @@ const XLogSummary: FC<{
</AutoResizeHeight>
</div>
)
console.log(data, cid)

if (!cid || !data?.data) {
if (!cid || error) {
Inner = null
}

Expand Down

1 comment on commit 1fed006

@vercel
Copy link

@vercel vercel bot commented on 1fed006 Jul 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

shiro – ./

shiro-git-main-innei.vercel.app
springtide.vercel.app
shiro-innei.vercel.app
innei.in

Please sign in to comment.