Skip to content

Commit eb4bc41

Browse files
Venefilynlachmanfrantisek
authored andcommitted
fix: memoize dependencies in ResultProgressStep
Some dependencies to `useMemo` in ResultProgressStep wasn't updated and didn't render properly. This should have been caught by linting when this was being implemented. The linting should be fixed by #392
1 parent a88fb52 commit eb4bc41

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

frontend/src/app/Results/ResultProgressStep.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export const ResultProgressStep: React.FC<ResultProgressStepProps> = ({
4646
Submitted
4747
</ProgressStep>
4848
);
49-
}, [startTime]);
49+
}, [startTime, submittedTime]);
5050

5151
const startStep = useMemo(() => {
5252
const isPending = !startTime;
@@ -98,7 +98,7 @@ export const ResultProgressStep: React.FC<ResultProgressStepProps> = ({
9898
{noun} {isPending ? "Pending" : isCurrent ? "In Progress" : "Done"}
9999
</ProgressStep>
100100
);
101-
}, [startTime]);
101+
}, [startTime, finishedTime, noun]);
102102

103103
return (
104104
<ProgressStepper aria-label={`Current ${noun.toLowerCase()} status`}>

0 commit comments

Comments
 (0)