Commit 77178afa authored by Steven's avatar Steven

chore: add no data tip

parent fd7b8c32
...@@ -78,7 +78,8 @@ const Explore = () => { ...@@ -78,7 +78,8 @@ 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 ? (
state.memos.map((memo) => {
const createdAtStr = dayjs(memo.createdTs).locale(locale).format("YYYY/MM/DD HH:mm:ss"); const createdAtStr = dayjs(memo.createdTs).locale(locale).format("YYYY/MM/DD HH:mm:ss");
return ( return (
<div className="memo-container" key={memo.id}> <div className="memo-container" key={memo.id}>
...@@ -93,7 +94,10 @@ const Explore = () => { ...@@ -93,7 +94,10 @@ const Explore = () => {
<MemoResources memo={memo} /> <MemoResources memo={memo} />
</div> </div>
); );
})} })
) : (
<p className="w-full text-center mt-12 text-gray-600">{t("message.no-memos")}</p>
)}
</main> </main>
</Only> </Only>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment