-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
50 lines (44 loc) · 1.29 KB
/
App.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// import Hello from "./Hello"
// import Followers from "./components/Followers"
import Info from "./components/Info"
import User from "./components/User"
import {BrowserRouter as Router} from "react-router-dom";
import Repos from "./components/Repos";
import Search from "./components/Search"
import Navbar from "./components/Navbar"
import {GithubContext} from "./Context/Context";
import loadingGif from "./Asset/images/loading1.gif";
import React from "react";
// import Popular from "./components/Popular"
const App = () => {
const {isLoading} = React.useContext(GithubContext);
if(isLoading){
return(
<Router>
<div className="App h-auto" style = {{backgroundColor:"#0E1122"}} >
<div className = "ml-20 mr-20 " style = {{backgroundColor:"#0E1122"}}>
<Navbar/>
<Search/>
<img src = {loadingGif} alt = "loading" style = {{backgroundColor:"black"}} />
</div>
</div>
</Router>
)
}
else{
return (
<Router>
<div className="App h-auto" style = {{backgroundColor:"#0E1122"}} >
<div className = "ml-20 mr-20 " style = {{backgroundColor:"#0E1122"}}>
<Navbar/>
<Search/>
<User/>
<Info/>
<Repos/>
</div>
</div>
</Router>
);
}
}
export default App;