fix #3 create a separate counter component

This commit is contained in:
Ahmed-Ayman 2018-12-06 00:02:33 +02:00
parent 4b90d1f895
commit a3ed5426c5
2 changed files with 12 additions and 8 deletions

View File

@ -6,20 +6,23 @@ class Header extends React.Component {
render() { render() {
const Logo = () => { const Logo = () => {
return ( return (
<header> <section className="logo-container">
<img className="site-logo" src={require('../assets/images/logo.png')} alt="logo 858 "/> <img className="site-logo" src={require('../assets/images/logo.png')} alt="logo 858 "/>
<br/> <br/>
<img className="site-logo" src={require('../assets/images/byline.ar.png')} alt="logo 858 "/> <img className="site-logo" src={require('../assets/images/byline.ar.png')} alt="logo 858 "/>
<h1 >An archive of resistance</h1> <h1>An archive of resistance</h1>
<h2 className="counter">٩٦٧ ساعة وبيزيدوا</h2> </section>
</header> );
}
const Counter = () => {
return (
<h2 className="counter">٩٦٧ ساعة وبيزيدوا</h2>
); );
} }
return ( return (
<header> <header>
<section className="container"> <Logo/>
<Logo/> <Counter/>
</section>
</header> </header>
) )
} }

View File

@ -61,4 +61,5 @@ header {
top: 0; top: 0;
padding: 2em; padding: 2em;
} }
/* search */ /* search */