-
Notifications
You must be signed in to change notification settings - Fork 633
Expand file tree
/
Copy pathgetAQuote.js
More file actions
34 lines (27 loc) · 694 Bytes
/
Copy pathgetAQuote.js
File metadata and controls
34 lines (27 loc) · 694 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
26
27
28
29
30
31
32
33
34
import React, { Component } from 'react';
import EmployeeService from '../services/EmployeeService';
class getAQuote extends Component {
constructor(props) {
super(props)
this.state = {
QuoteMessage : ''
}
}
componentDidMount(){
EmployeeService.getQuote().then(res => {
this.setState({
QuoteMessage: res.data
})
})
}
render(props) {
return (
<div >
<center><h3>Here is a Quote for you : </h3>
<h1>{this.state.QuoteMessage}</h1>
</center>
</div>
);
}
}
export default getAQuote;