-
Notifications
You must be signed in to change notification settings - Fork 0
/
Condition.js
49 lines (42 loc) · 876 Bytes
/
Condition.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
import React, { Component } from 'react'
export class Condition extends Component {
constructor(props) {
super(props)
this.state = {
login : true,
pass : true
}
}
render() {
const {pass,login} = this.state
if(login&&pass){
return (
<div>
<h1>You are logged in and have pass </h1>
</div>
)
}
else if(!login&&pass){
return (
<div>
<h1>You are not logged in but have pass</h1>
</div>
)
}
else if(login&&!pass){
return (
<div>
<h1>You are logged in but not have pass</h1>
</div>
)
}
else {
return (
<div>
<h1>You are not logged in and not have pass</h1>
</div>
)
}
}
}
export default Condition