Skip to content

Commit c8c02b6

Browse files
committed
fix(frontend): revert loading to prop-based
Signed-off-by: Ratnapradeep <prpr23091999@gmail.com>
1 parent 6ce15a3 commit c8c02b6

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

frontend/src/pages/RunDetails.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ interface RunDetailsState {
141141
mlmdExecutions?: Execution[];
142142
showReducedGraph?: boolean;
143143
namespace?: string;
144-
isLoading: boolean;
145144
}
146145

147146
export const css = stylesheet({
@@ -192,7 +191,6 @@ class RunDetails extends Page<RunDetailsInternalProps, RunDetailsState> {
192191
mlmdRunContext: undefined,
193192
mlmdExecutions: undefined,
194193
showReducedGraph: false,
195-
isLoading: false,
196194
};
197195

198196
private readonly AUTO_REFRESH_INTERVAL = 5000;
@@ -240,7 +238,7 @@ class RunDetails extends Page<RunDetailsInternalProps, RunDetailsState> {
240238
}
241239

242240
public render(): JSX.Element {
243-
if (this.state.isLoading) {
241+
if (this.props.isLoading) {
244242
return (
245243
<div style={{ textAlign: 'center', paddingTop: '40px' }}>
246244
<CircularProgress />
@@ -750,7 +748,6 @@ class RunDetails extends Page<RunDetailsInternalProps, RunDetailsState> {
750748
}
751749

752750
public async load(): Promise<void> {
753-
this.setState({ isLoading: true });
754751
this.clearBanner();
755752
const runId = this.props.match.params[RouteParams.runId];
756753

@@ -931,7 +928,6 @@ class RunDetails extends Page<RunDetailsInternalProps, RunDetailsState> {
931928

932929
// Load all run's outputs
933930
await this._loadAllOutputs();
934-
this.setState({ isLoading: false });
935931
}
936932

937933
private handleError = async (error: Error) => {

0 commit comments

Comments
 (0)