-
Notifications
You must be signed in to change notification settings - Fork 2.5k
/
About.js
50 lines (38 loc) · 1.55 KB
/
About.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 React, {Component} from 'react';
import Helmet from 'react-helmet';
import { MiniInfoBar } from 'components';
export default class About extends Component {
state = {
showKitten: false
}
handleToggleKitten = () => this.setState({showKitten: !this.state.showKitten});
render() {
const {showKitten} = this.state;
const kitten = require('./kitten.jpg');
return (
<div className="container">
<h1>About Us</h1>
<Helmet title="About Us"/>
<p>This project was originally created by Erik Rasmussen
(<a href="https://twitter.com/erikras" target="_blank">@erikras</a>), but has since seen many contributions
from the open source community. Thank you to <a
href="https://github.com/erikras/react-redux-universal-hot-example/graphs/contributors"
target="_blank">all the contributors</a>.
</p>
<h3>Mini Bar <span style={{color: '#aaa'}}>(not that kind)</span></h3>
<p>Hey! You found the mini info bar! The following component is display-only. Note that it shows the same
time as the info bar.</p>
<MiniInfoBar/>
<h3>Images</h3>
<p>
Psst! Would you like to see a kitten?
<button className={'btn btn-' + (showKitten ? 'danger' : 'success')}
style={{marginLeft: 50}}
onClick={this.handleToggleKitten}>
{showKitten ? 'No! Take it away!' : 'Yes! Please!'}</button>
</p>
{showKitten && <div><img src={kitten}/></div>}
</div>
);
}
}