Skip to content

Commit 2a13902

Browse files
committed
tone down empty switches table message
1 parent 2b0c3f1 commit 2a13902

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

app/pages/system/inventory/SwitchesTab.tsx

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,6 @@ import { Servers24Icon } from '@oxide/design-system/icons/react'
1313
import { useQueryTable } from '~/table/QueryTable'
1414
import { EmptyMessage } from '~/ui/lib/EmptyMessage'
1515

16-
const EmptyState = () => (
17-
<EmptyMessage
18-
icon={<Servers24Icon />}
19-
title="Something went wrong"
20-
body="We expected some switches here, but none were found"
21-
/>
22-
)
23-
2416
const switchList = getListQFn('switchList', {})
2517

2618
export async function loader() {
@@ -29,7 +21,7 @@ export async function loader() {
2921
}
3022

3123
const colHelper = createColumnHelper<Switch>()
32-
const staticCols = [
24+
const columns = [
3325
colHelper.accessor('id', {}),
3426
colHelper.accessor('baseboard.part', { header: 'part number' }),
3527
colHelper.accessor('baseboard.serial', { header: 'serial number' }),
@@ -38,7 +30,7 @@ const staticCols = [
3830

3931
Component.displayName = 'SwitchesTab'
4032
export function Component() {
41-
const emptyState = <EmptyState />
42-
const { table } = useQueryTable({ query: switchList, columns: staticCols, emptyState })
33+
const emptyState = <EmptyMessage icon={<Servers24Icon />} title="No switches found" />
34+
const { table } = useQueryTable({ query: switchList, columns, emptyState })
4335
return table
4436
}

0 commit comments

Comments
 (0)