|
|
|
@ -78,25 +78,25 @@ const Explore = () => {
|
|
|
|
|
{sortedMemos.map((memo) => (
|
|
|
|
|
<MemoView key={`${memo.name}-${memo.updateTime}`} memo={memo} showCreator showVisibility showPinned compact />
|
|
|
|
|
))}
|
|
|
|
|
{isRequesting ? (
|
|
|
|
|
<div className="flex flex-row justify-center items-center w-full my-4 text-gray-400">
|
|
|
|
|
<Icon.Loader className="w-4 h-auto animate-spin mr-1" />
|
|
|
|
|
<p className="text-sm italic">{t("memo.fetching-data")}</p>
|
|
|
|
|
</div>
|
|
|
|
|
) : !nextPageToken ? (
|
|
|
|
|
sortedMemos.length === 0 && (
|
|
|
|
|
<div className="w-full mt-12 mb-8 flex flex-col justify-center items-center italic">
|
|
|
|
|
<Empty />
|
|
|
|
|
<p className="mt-2 text-gray-600 dark:text-gray-400">{t("message.no-data")}</p>
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
) : (
|
|
|
|
|
{nextPageToken && (
|
|
|
|
|
<div className="w-full flex flex-row justify-center items-center my-4">
|
|
|
|
|
<Button variant="plain" endDecorator={<Icon.ArrowDown className="w-5 h-auto" />} onClick={() => fetchMemos(nextPageToken)}>
|
|
|
|
|
{t("memo.fetch-more")}
|
|
|
|
|
<Button
|
|
|
|
|
variant="plain"
|
|
|
|
|
color="neutral"
|
|
|
|
|
loading={isRequesting}
|
|
|
|
|
endDecorator={<Icon.ArrowDown className="w-4 h-auto" />}
|
|
|
|
|
onClick={() => fetchMemos(nextPageToken)}
|
|
|
|
|
>
|
|
|
|
|
{t("memo.load-more")}
|
|
|
|
|
</Button>
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
{!nextPageToken && sortedMemos.length === 0 && (
|
|
|
|
|
<div className="w-full mt-12 mb-8 flex flex-col justify-center items-center italic">
|
|
|
|
|
<Empty />
|
|
|
|
|
<p className="mt-2 text-gray-600 dark:text-gray-400">{t("message.no-data")}</p>
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
{md && (
|
|
|
|
|