import type { JSX } from 'react'; import { useJobs } from '../../shared/api/useJobs'; import { LoadError } from '../../shared/ui/LoadError'; import { Skeleton } from '../../shared/ui/Skeleton'; import { JobRow } from './JobRow'; export function JobsPanel( { now }: { now: number } ): JSX.Element { const jobsQuery = useJobs(); return ( <> { jobsQuery.isPending && } { jobsQuery.isError && jobsQuery.data === undefined && ( { void jobsQuery.refetch(); } } /> ) } { jobsQuery.data !== undefined && ( { jobsQuery.data.map( ( job ) => ( ) ) } ) } > ); }