Skip to content

Commit

Permalink
Make task duration auto-update (#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
obgibson committed Mar 5, 2024
1 parent 7731f98 commit d619ef5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pages/Task/components/TaskDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import styled from 'styled-components';
import RenderMetadata from '../../../components/RenderMetadata';
import DataHeader from '../../../components/DataHeader';
import { Resource } from '../../../hooks/useResource';
import AutoUpdating from '../../../components/AutoUpdating';

type Props = {
run: Run;
Expand Down Expand Up @@ -68,7 +69,7 @@ const TaskDetails: React.FC<Props> = ({ task, metadata, metadataResource, develo
},
{
label: t('fields.duration'),
value: getAttemptDuration(task),
value: <AutoUpdating enabled={!task.finished_at} content={() => getAttemptDuration(task)} />,
},
];

Expand Down

0 comments on commit d619ef5

Please sign in to comment.