-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathWelcomeBack.js
More file actions
25 lines (22 loc) · 726 Bytes
/
Copy pathWelcomeBack.js
File metadata and controls
25 lines (22 loc) · 726 Bytes
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
class WelcomeBack extends React.Component {
constructor(props){
super(props);
this.state = {
name: 'J',
apppVersion: '1'
}
}
render(){
return(
<>
<h2>Hello {this.state.name || 'Friend'}! Welcome Back.</h2>
{
this.state.apppVersion && this.state.apppVersion < 2
? <p>Your app is out of date. Please download the new version and take a look at all the new features.</p>
: ''
}
<CoolButton customText={this.state.apppVersion && this.state.apppVersion < 2 ? 'Download v2' : 'Download'} />
</>
)
}
}