fix(frontend): don't show number of logs when no logs available
This commit is contained in:
@@ -78,10 +78,10 @@ const RequestLogs: Component = () => {
|
|||||||
<div class="flex items-center justify-between">
|
<div class="flex items-center justify-between">
|
||||||
<h2 class="text-2xl font-semibold">
|
<h2 class="text-2xl font-semibold">
|
||||||
Request Logs
|
Request Logs
|
||||||
<Show when={!logsData.loading}>
|
<Show when={totalLogs()}>
|
||||||
<span class="text-gray-500 text-base ml-2">
|
<span class="text-gray-500 text-base ml-2">
|
||||||
(Showing {totalLogs() === 0 ? 0 : (page() - 1) * PAGE_SIZE + 1}-
|
(Showing {(page() - 1) * PAGE_SIZE + 1}-{Math.min(page() * PAGE_SIZE, totalLogs())} of{" "}
|
||||||
{Math.min(page() * PAGE_SIZE, totalLogs())} of {totalLogs()})
|
{totalLogs()})
|
||||||
</span>
|
</span>
|
||||||
</Show>
|
</Show>
|
||||||
</h2>
|
</h2>
|
||||||
|
|||||||
Reference in New Issue
Block a user