Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use EmptyCell when we'd have an empty cell in InstanceLinkCell #2631

Merged
merged 1 commit into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/table/cells/InstanceLinkCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { useApiQuery } from '@oxide/api'
import { useProjectSelector } from '~/hooks/use-params'
import { pb } from '~/util/path-builder'

import { SkeletonCell } from './EmptyCell'
import { EmptyCell, SkeletonCell } from './EmptyCell'
import { LinkCell } from './LinkCell'

export const InstanceLinkCell = ({ instanceId }: { instanceId?: string }) => {
Expand All @@ -23,7 +23,7 @@ export const InstanceLinkCell = ({ instanceId }: { instanceId?: string }) => {
)

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

return (
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/disks.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ test('List disks and snapshot', async ({ page }) => {
state: 'attached',
})
await expectRowVisible(table, {
'Attached to': '',
'Attached to': '',
name: 'disk-3',
size: '6 GiB',
state: 'detached',
Expand Down
Loading