mirror of
https://github.com/ClaytonWWilson/CS307-Team24.git
synced 2025-12-16 02:08:47 +00:00
Circular progress when the editProfile page is loading
This commit is contained in:
parent
825c126c6c
commit
a4cce0b75e
@ -56,6 +56,7 @@ export class editProfile extends Component {
|
||||
// Sets the default values of all the textboxes to the data
|
||||
// that is stored in the database for the user.
|
||||
componentDidMount() {
|
||||
this.setState({pageLoading: true})
|
||||
axios
|
||||
.get("/getProfileInfo")
|
||||
.then((res) => {
|
||||
@ -64,7 +65,8 @@ export class editProfile extends Component {
|
||||
lastName: res.data.lastName,
|
||||
email: res.data.email,
|
||||
handle: res.data.handle,
|
||||
bio: res.data.bio
|
||||
bio: res.data.bio,
|
||||
pageLoading: false
|
||||
});
|
||||
})
|
||||
.catch((err) => {
|
||||
@ -89,6 +91,7 @@ export class editProfile extends Component {
|
||||
bio: "",
|
||||
anchorEl: null,
|
||||
loading: false,
|
||||
pageLoading: false,
|
||||
errors: {}
|
||||
};
|
||||
}
|
||||
@ -171,6 +174,9 @@ export class editProfile extends Component {
|
||||
const id = open ? 'simple-popover' : undefined;
|
||||
|
||||
return (
|
||||
this.state.pageLoading ?
|
||||
<CircularProgress size={60} style={{marginTop: "300px"}}></CircularProgress>
|
||||
:
|
||||
<Grid container className={classes.form} id="container-grid">
|
||||
<Grid item sm >
|
||||
<Button
|
||||
|
||||
Loading…
Reference in New Issue
Block a user