mirror of
https://github.com/usememos/memos.git
synced 2025-02-22 06:07:51 +01:00
chore: add no data tip
This commit is contained in:
parent
fd7b8c3293
commit
77178afad5
@ -78,22 +78,26 @@ const Explore = () => {
|
|||||||
</div>
|
</div>
|
||||||
<Only when={!loadingState.isLoading}>
|
<Only when={!loadingState.isLoading}>
|
||||||
<main className="memos-wrapper">
|
<main className="memos-wrapper">
|
||||||
{state.memos.map((memo) => {
|
{state.memos.length > 0 ? (
|
||||||
const createdAtStr = dayjs(memo.createdTs).locale(locale).format("YYYY/MM/DD HH:mm:ss");
|
state.memos.map((memo) => {
|
||||||
return (
|
const createdAtStr = dayjs(memo.createdTs).locale(locale).format("YYYY/MM/DD HH:mm:ss");
|
||||||
<div className="memo-container" key={memo.id}>
|
return (
|
||||||
<div className="memo-header">
|
<div className="memo-container" key={memo.id}>
|
||||||
<span className="time-text">{createdAtStr}</span>
|
<div className="memo-header">
|
||||||
<span className="split-text">by</span>
|
<span className="time-text">{createdAtStr}</span>
|
||||||
<a className="name-text" href={`/u/${memo.creator.id}`}>
|
<span className="split-text">by</span>
|
||||||
{memo.creator.name}
|
<a className="name-text" href={`/u/${memo.creator.id}`}>
|
||||||
</a>
|
{memo.creator.name}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<MemoContent className="memo-content" content={memo.content} onMemoContentClick={() => undefined} />
|
||||||
|
<MemoResources memo={memo} />
|
||||||
</div>
|
</div>
|
||||||
<MemoContent className="memo-content" content={memo.content} onMemoContentClick={() => undefined} />
|
);
|
||||||
<MemoResources memo={memo} />
|
})
|
||||||
</div>
|
) : (
|
||||||
);
|
<p className="w-full text-center mt-12 text-gray-600">{t("message.no-memos")}</p>
|
||||||
})}
|
)}
|
||||||
</main>
|
</main>
|
||||||
</Only>
|
</Only>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user