File tree Expand file tree Collapse file tree 2 files changed +21
-22
lines changed Expand file tree Collapse file tree 2 files changed +21
-22
lines changed Original file line number Diff line number Diff line change 33}
44
55.home-logo {
6- animation : home-logo-spin infinite 20 s linear ;
7- height : 40 vmin ;
8- pointer-events : none;
6+ width : 320 px ;
7+ margin-top : 32 px ;
8+ margin-bottom : 28 px
99}
1010
1111.home-header {
1414 display : flex;
1515 flex-direction : column;
1616 align-items : center;
17- justify-content : center ;
17+ justify-content : flex-start ;
1818 font-size : calc (10px + 2vmin );
1919 color : white;
2020}
Original file line number Diff line number Diff line change 1- import React from 'react' ;
2- import logo from '../logo.svg' ;
3- import './home.css' ;
1+ import React from "react" ;
2+ import "./home.css" ;
43
54function Home ( props ) {
6-
7- const { loading, error, data} = props ;
8- console . log ( props )
5+ const { loading, error, data } = props ;
96 return (
107 < div className = "home" >
118 < header className = "home-header" >
12- < img src = { logo } className = "home-logo" alt = "logo" />
13- < p >
14- Edit < code > src/App.js</ code > and save to reload.
15- </ p >
16- < a
17- className = "home-link"
18- href = "https://reactjs.org"
19- target = "_blank"
20- rel = "noopener noreferrer"
21- >
22- Learn React
23- </ a >
9+ < img
10+ src = "https://codebuddies.org/images/logo.svg"
11+ className = "home-logo"
12+ alt = "logo"
13+ />
14+
15+ { loading ? < div > Loading Data from backend</ div > : null }
16+ { error ? < div > Error loading data</ div > : null }
17+
18+ { data && data . rates && data . rates . map ( ( r , i ) => (
19+ < div key = { i } >
20+ { r . currency } : { r . rate } USD$
21+ </ div >
22+ ) ) }
2423 </ header >
2524 </ div >
2625 ) ;
You can’t perform that action at this time.
0 commit comments