Reformat loading thing

This commit is contained in:
Alex 2022-02-28 21:45:43 +01:00
parent 51d96396ef
commit 7e324ec541
Signed by: lx
GPG key ID: 0E496D15096376BE

View file

@ -151,15 +151,6 @@ class ObjectList extends React.Component<Props, State> {
} }
render() { render() {
if (!this.state.loaded) {
return (
<>
{ this.renderBreadcrumbs() }
<Alert variant="secondary">Loading...</Alert>
</>
);
}
return ( return (
<> <>
{ this.state.iUpload > 0 ? { this.state.iUpload > 0 ?
@ -191,6 +182,7 @@ class ObjectList extends React.Component<Props, State> {
</div> </div>
</Stack> </Stack>
</Container> </Container>
{ this.state.loaded ?
<ListGroup> <ListGroup>
{ this.state.folders.map((f) => { this.state.folders.map((f) =>
<LinkContainer key={f + "/"} to={ "/" + this.props.bucket + "/" + this.props.prefix + f }> <LinkContainer key={f + "/"} to={ "/" + this.props.bucket + "/" + this.props.prefix + f }>
@ -227,6 +219,9 @@ class ObjectList extends React.Component<Props, State> {
</ListGroup.Item> </ListGroup.Item>
)} )}
</ListGroup> </ListGroup>
:
<Alert variant="secondary">Loading...</Alert>
}
</> </>
); );
} }