Skip to content

Commit 746e91f

Browse files
fix(nodes-list): update condition for displaying empty state when no nodes are found
1 parent 5de8401 commit 746e91f

File tree

3 files changed

+1
-4
lines changed

3 files changed

+1
-4
lines changed

dashboard/src/components/admins/columns.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ const createSortButton = (
2929
const handleClick = (e: React.MouseEvent) => {
3030
e.preventDefault()
3131
e.stopPropagation()
32-
console.log('Sorting by column:', column)
3332
handleSort(column)
3433
}
3534

dashboard/src/components/dashboard/data-usage-chart.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ const transformUsageData = (apiData: { stats: (UserUsageStat | NodeUsageStat)[]
4141
return apiData.stats.map((stat: UserUsageStat | NodeUsageStat) => {
4242
const d = dateUtils.toDayjs(stat.period_start)
4343
const isToday = d.isSame(today, 'day')
44-
console.log(d.format('HH:mm'), stat.period_start);
4544

4645

4746
let displayLabel = ''
@@ -109,7 +108,6 @@ const transformUsageData = (apiData: { stats: (UserUsageStat | NodeUsageStat)[]
109108
const traffic = isNodeUsage
110109
? ((stat as NodeUsageStat).uplink || 0) + ((stat as NodeUsageStat).downlink || 0)
111110
: ((stat as UserUsageStat).total_traffic || 0)
112-
console.log(displayLabel, d);
113111

114112
return {
115113
date: displayLabel,

dashboard/src/components/nodes/nodes-list.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ export default function NodesList() {
290290
: nodesData.map(node => <Node key={node.id} node={node} onEdit={handleEdit} onToggleStatus={handleToggleStatus} />)}
291291
</div>
292292

293-
{!showLoadingSpinner && !showPageLoadingSkeletons && nodesData.length === 0 && !filters.search && totalNodes === 0 && (
293+
{!showLoadingSpinner && !showPageLoadingSkeletons && nodesData.length === 0 && !filters.search && !localSearchTerm && totalNodes === 0 && (
294294
<Card className="mb-12">
295295
<CardContent className="p-8 text-center">
296296
<div className="space-y-4">

0 commit comments

Comments
 (0)