Skip to content

Commit aa46e50

Browse files
authored
Use EmptyCell when we'd have an empty cell in InstanceLinkCell (#2631)
Use EmptyCell when we'd have an empty cell
1 parent 892fc2e commit aa46e50

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

app/table/cells/InstanceLinkCell.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { useApiQuery } from '@oxide/api'
1111
import { useProjectSelector } from '~/hooks/use-params'
1212
import { pb } from '~/util/path-builder'
1313

14-
import { SkeletonCell } from './EmptyCell'
14+
import { EmptyCell, SkeletonCell } from './EmptyCell'
1515
import { LinkCell } from './LinkCell'
1616

1717
export const InstanceLinkCell = ({ instanceId }: { instanceId?: string }) => {
@@ -23,7 +23,7 @@ export const InstanceLinkCell = ({ instanceId }: { instanceId?: string }) => {
2323
)
2424

2525
// has to be after the hooks because hooks can't be executed conditionally
26-
if (!instanceId) return null
26+
if (!instanceId) return <EmptyCell />
2727
if (!instance) return <SkeletonCell />
2828

2929
return (

test/e2e/disks.e2e.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ test('List disks and snapshot', async ({ page }) => {
2929
state: 'attached',
3030
})
3131
await expectRowVisible(table, {
32-
'Attached to': '',
32+
'Attached to': '',
3333
name: 'disk-3',
3434
size: '6 GiB',
3535
state: 'detached',

0 commit comments

Comments
 (0)