File tree Expand file tree Collapse file tree 4 files changed +38
-6
lines changed Expand file tree Collapse file tree 4 files changed +38
-6
lines changed Original file line number Diff line number Diff line change 2121npm-debug.log *
2222yarn-debug.log *
2323yarn-error.log *
24- debug.log
25-
26- Screenshot.PNG
27- src /README.md
24+ debug.log
Original file line number Diff line number Diff line change 1+ import React from 'react' ;
2+ import PropTypes from 'prop-types' ;
3+ import { withStyles } from '@material-ui/core/styles' ;
4+ import CircularProgress from '@material-ui/core/CircularProgress' ;
5+
6+
7+ const styles = theme => ( {
8+ progress : {
9+ margin : theme . spacing . unit * 2 ,
10+ } ,
11+ } ) ;
12+
13+
14+ const Loading = ( {
15+ classes,
16+
17+ } ) => {
18+
19+ return (
20+ < div style = { { textAlign : "center" } } >
21+ < CircularProgress
22+ color = "secondary"
23+ className = { classes . progress }
24+ />
25+ </ div >
26+ ) ;
27+ }
28+
29+
30+ Loading . propTypes = {
31+ classes : PropTypes . object . isRequired ,
32+ } ;
33+
34+
35+ export default withStyles ( styles ) ( Loading ) ;
Original file line number Diff line number Diff line change 22// import './App.css';
33import React , { Component } from 'react' ;
44import RepoList from '../Components/RepoList' ;
5+ import Loading from '../Components/Loading' ;
56// import Repo from '../Components/Repo';
67import axios from 'axios' ;
78import moment from 'moment' ;
@@ -80,7 +81,6 @@ class App extends Component {
8081 page : prevState . page + page ,
8182 loading : true ,
8283 } ) )
83-
8484 this . loadRepo ( ) ;
8585 }
8686
@@ -92,7 +92,7 @@ class App extends Component {
9292 return (
9393 < div >
9494 < RepoList repo = { repo } />
95- < div > Loading ... </ div >
95+ < Loading > </ Loading >
9696 </ div >
9797 )
9898 }
You can’t perform that action at this time.
0 commit comments