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">
|
||||
<h2 class="text-2xl font-semibold">
|
||||
Request Logs
|
||||
<Show when={!logsData.loading}>
|
||||
<Show when={totalLogs()}>
|
||||
<span class="text-gray-500 text-base ml-2">
|
||||
(Showing {totalLogs() === 0 ? 0 : (page() - 1) * PAGE_SIZE + 1}-
|
||||
{Math.min(page() * PAGE_SIZE, totalLogs())} of {totalLogs()})
|
||||
(Showing {(page() - 1) * PAGE_SIZE + 1}-{Math.min(page() * PAGE_SIZE, totalLogs())} of{" "}
|
||||
{totalLogs()})
|
||||
</span>
|
||||
</Show>
|
||||
</h2>
|
||||
|
||||
Reference in New Issue
Block a user