diff options
Diffstat (limited to 'src/client/views/nodes/LoadingBox.tsx')
-rw-r--r-- | src/client/views/nodes/LoadingBox.tsx | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/src/client/views/nodes/LoadingBox.tsx b/src/client/views/nodes/LoadingBox.tsx index 90bf90095..f3243f6cd 100644 --- a/src/client/views/nodes/LoadingBox.tsx +++ b/src/client/views/nodes/LoadingBox.tsx @@ -35,33 +35,14 @@ export class LoadingBox extends ViewBoxAnnotatableComponent<FieldViewProps>() { return FieldView.LayoutString(LoadingBox, fieldKey); } - /** - * Returns true if file is uploading, false otherwise - */ - @computed private get isLoading(): boolean { - const file = Docs.Create.docsToFiles.get(this.rootDoc); - return file ? true : false; - } - - constructor(props: any) { - super(props); - } - render() { return ( <div className="loadingBoxContainer"> - {this.isLoading ? ( - <div className="textContainer"> - <p className="headerText">Loading:</p> - <span className="text">{StrCast(this.rootDoc.title)}</span> - <ReactLoading type={'spinningBubbles'} color={'blue'} height={100} width={100} /> - </div> - ) : ( - <div className="textContainer"> - <p className="headerText">Error Loading File: </p> - <span className="text">{StrCast(this.rootDoc.title)}</span> - </div> - )} + <div className="textContainer"> + <p className="headerText">{this.rootDoc.isLoading ? 'Loading:' : 'Error Loading File:'}</p> + <span className="text">{StrCast(this.rootDoc.title)}</span> + {!this.rootDoc.isLoading ? null : <ReactLoading type={'spinningBubbles'} color={'blue'} height={100} width={100} />} + </div> </div> ); } |